### Question:
PostService implements Service { private void getAllPosts(ServerRequest serverRequest, ServerResponse serverResponse) { this.posts.all() .thenApply(EntityUtils::toJsonArray) .thenCompose(data -> serverResponse.send(data)) .exceptionally(throwable -> { LOGGER.log(Level.WARNING, "Failed to getAllPosts", throwable); serverRequest.next(throwable); return null; }); } PostService(PostRepository posts, CommentRepository comments); @Override void update(Routing.Rules rules);  }### Answer:
@Test public void testGetAllPosts() throws Exception { String path = "/posts"; WebTarget targetGetAll = client.target(URI.create("http: try (Response resGetAll = targetGetAll.request().accept(MediaType.APPLICATION_JSON_TYPE).get()) { assertEquals(200, resGetAll.getStatus()); List<Post> results = resGetAll.readEntity(new GenericType<List<Post>>() {}); assertTrue(results != null); LOGGER.info("results.size()::" + results.size()); assertTrue(results.size() == 2); } }