responseMsgBuilder.setMessageId(receivedRequest.getMessageId());
responseMsgBuilder.setResponse(response);
Message responseMsg = responseMsgBuilder.build();
// Send the response back to the client
responseMsg.writeDelimitedTo(network.getServerSocket().getOutputStream());
// Make sure that the response received on the client is identical to
// the response sent by the server
assertEquals(responseFuture.get(2, TimeUnit.SECONDS), response);