@Test public void testGetIt() { String responseMsg = target.path("myresource").request().get(String.class); assertEquals("Got it!", responseMsg); }
@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(); @GET @Path("/empty") Response empty(); }
MyResource { @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; }  @GET @Produces(MediaType.TEXT_PLAIN) String getIt(); @GET @Path("/empty") Response empty();  }