@Test public void test() throws IOException { final Response response = this.service.convertToBytes(new Request("hello world!")); Assert.assertNotNull(response.getResult()); final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); response.getResult().writeTo(outputStream); Assert.assertTrue("datahandler is empty", outputStream.size() > 0); }
public Response convertToBytes(final Request request) { return new Response(new DataHandler(request.getMessage().getBytes(), "application/octet-stream")); }
AbstractService { public Response convertToBytes(final Request request) { return new Response(new DataHandler(request.getMessage().getBytes(), "application/octet-stream")); } }
AbstractService { public Response convertToBytes(final Request request) { return new Response(new DataHandler(request.getMessage().getBytes(), "application/octet-stream")); }  }
AbstractService { public Response convertToBytes(final Request request) { return new Response(new DataHandler(request.getMessage().getBytes(), "application/octet-stream")); }  Response convertToBytes(final Request request); }
AbstractService { public Response convertToBytes(final Request request) { return new Response(new DataHandler(request.getMessage().getBytes(), "application/octet-stream")); }  Response convertToBytes(final Request request);  }