### Question:
BidRestService { @POST @Consumes("application/json") @Produces("application/json") public Bid addBid(Bid bid) { return bidService.addBid(bid); }  @POST @Consumes("application/json") @Produces("application/json") Bid addBid(Bid bid); @GET @Path("{id}") @Produces("application/json") Bid getBid(@PathParam("id") Long id); @PUT @Path("{id}") @Consumes("application/json") void updateBid(@PathParam("id") Long id, Bid bid); @DELETE @Path("{id}") void deleteBid(@PathParam("id") Long id);  }### Answer:
@Test @InSequence(1) public void testAddBid() { WebTarget target = ClientBuilder.newClient() .target("http: Bid bid = new Bid(); bid.setBidder("nrahman"); bid.setItem("Test item"); bid.setAmount(130.75); bid = target.request("application/json").post(Entity.json(bid), Bid.class); bidId = bid.getId(); bid = target.path("{id}").resolveTemplate("id", bidId) .request("application/json").get(Bid.class); assertEquals("nrahman", bid.getBidder()); assertEquals("Test item", bid.getItem()); assertEquals(new Double(130.75), bid.getAmount()); }