public function testApiGetEndpoint_ReturnsEndpoint()
{
$endpoint = 'endpoint';
$socket = $this->createSocket();
$socket->expects($this->once())->method('getRemoteEndpoint')->will($this->returnValue($endpoint));
$conn = $this->createNetworkConnection($socket);
$this->assertSame($endpoint, $conn->getEndpoint());
}