// echo message back to client
final Response rsp = new Response();
rsp.setPayload(contents);
Assert.assertTrue(Arrays.equals(contents, rsp.getPayload()));
handler.sendResponse(rsp, req);
// handler.sendResponse(rsp, req);
// read out message at client
final byte[] msg1 = readInputStream(in, true);
Assert.assertTrue("zero-length message", msg1.length > 0);