@Test
public void testTcpEchoResponseWithSocketTimeoutError(@Mocked final Socket socket) throws Exception {

    new Expectations() {{
        //return an outputstream we control
        socket.getOutputStream();
        result = testOutputStream;
        socket.getInputStream();
        result = new SocketTimeoutException("Forcefully thrown exception");
    }};
    final EchoProtocolTcpTask task = new EchoProtocolTcpTask(qosTest, clientHolder.getTaskDescList().get(0), 0);
    final QoSTestResult res = task.call();
    assertEquals("Result did not return TIMEOUT","TIMEOUT", res.getResultMap().get(AbstractEchoProtocolTask.RESULT_STATUS));
    assertEquals("Wrong echo service host in result", ECHO_SERVICE_HOST, res.getResultMap().get("echo_protocol_objective_host"));
    assertEquals("Wrong protocol type in result", AbstractEchoProtocolTask.PROTOCOL_TCP, res.getResultMap().get(AbstractEchoProtocolTask.RESULT_PROTOCOL));
}