CombinedFeedController { @GET @Template(name = "/index.ftl") public Viewable getAll() { return new Viewable("/index.ftl", getModel()); }  @POST @Template(name = "/index.ftl") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Viewable create(@Valid @BeanParam FeedRequestBean request); @POST @Template(name = "/index.ftl") @Path("/delete/{feedId}") Viewable delete(@PathParam("feedId") String feedId); @GET @Template(name = "/index.ftl") Viewable getAll(); @GET @Template(name = "/feed-entries.ftl") @Path("/{id}") CombinedFeed get(@PathParam("id") String feedId);  }
@Test public void testGetAll() { datastore.put("1", combinedFeed("1")); datastore.put("2", combinedFeed("2")); Response response = target().request().get(); assertEquals(Status.OK.getStatusCode(), response.getStatus()); String html = response.readEntity(String.class); assertTrue(html.contains("<th>1</th>") && html.contains("<th>2</th>")); }