@Test public void testGetIt() { Response response = target.path("myresource").request().get(); assertEquals(200, response.getStatus()); assertEquals("Got it!", response.readEntity(String.class)); }
@GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; }
MyResource { @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; } }
MyResource { @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; }  }
MyResource { @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; }  @GET @Produces(MediaType.TEXT_PLAIN) String getIt(); @POST @Produces(MediaType.APPLICATION_JSON) Model postIt(); }
MyResource { @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; }  @GET @Produces(MediaType.TEXT_PLAIN) String getIt(); @POST @Produces(MediaType.APPLICATION_JSON) Model postIt();  }