public function testApiHandleMessage_AttemptsUpgarde_WhenReceivedNotEstablishedConnection()
{
$conn = $this->getMock(NetworkConnectionInterface::class, [], [], '', false);
$mssg = new NetworkMessage('Message');
$conn->WebSocket = new StdClass();
$conn->WebSocket->closing = false;
$conn->WebSocket->established = false;
$aware = $this->createAware();
$component = $this->createComponent();
$server = $this->createServer($aware, $component, ['attemptUpgrade']);
$server->expects($this->once())->method('attemptUpgrade')->with($conn);
$server->handleMessage($conn, $mssg);
}