CombinedFeedResource { @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response create(@Valid CombinedFeed insertedFeed) { CombinedFeed feed = feedService.save(insertedFeed); return Response.created(getEntityLocation(feed.getId())).entity(feed).build(); }  @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response create(@Valid CombinedFeed insertedFeed); @DELETE @Path("/{id}") Response delete(@PathParam("id") String feedId); @GET @Path("/{id}/entries") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML}) Response getEntries(@PathParam("id") String feedId);  }
@Test public void testCreate() { CombinedFeed feed = combinedFeed("1"); Entity<CombinedFeed> entity = Entity.entity(feed, APPLICATION_JSON_TYPE); Response response = target.request(MediaType.APPLICATION_JSON).post(entity); assertEquals(Status.CREATED.getStatusCode(), response.getStatus()); assertEquals(feed, response.readEntity(CombinedFeed.class)); }