@Test public void testPostIt() { Response response = target.path("myresource").request().post(null); assertEquals(200, response.getStatus()); MyResource.Model model = response.readEntity(MyResource.Model.class); assertEquals("todd", model.getName()); assertEquals("http: assertNotNull(model.getId()); }
@POST @Produces(MediaType.APPLICATION_JSON) public Model postIt() { return new Model("todd", "http: }
MyResource { @POST @Produces(MediaType.APPLICATION_JSON) public Model postIt() { return new Model("todd", "http: } }
MyResource { @POST @Produces(MediaType.APPLICATION_JSON) public Model postIt() { return new Model("todd", "http: }  }
MyResource { @POST @Produces(MediaType.APPLICATION_JSON) public Model postIt() { return new Model("todd", "http: }  @GET @Produces(MediaType.TEXT_PLAIN) String getIt(); @POST @Produces(MediaType.APPLICATION_JSON) Model postIt(); }
MyResource { @POST @Produces(MediaType.APPLICATION_JSON) public Model postIt() { return new Model("todd", "http: }  @GET @Produces(MediaType.TEXT_PLAIN) String getIt(); @POST @Produces(MediaType.APPLICATION_JSON) Model postIt();  }