SpecOfferBenefitController extends BaseController implements CrudController<SpecOfferBenefitResource, SpecOfferBenefitResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{specOfferId}/benefits/{specOfferBenefitId}", method = RequestMethod.DELETE) @ApiOperation(value = "Delete Spec Offer Benefit", position = 4) public MessageResource removeResource(@PathVariable("specOfferBenefitId") final Long specOfferBenefitId) { LOG.info("Removing Spec Offer Subject with id: {}", specOfferBenefitId); facade.removeResource(specOfferBenefitId); return new MessageResource(MessageType.INFO, "SpecOfferBenefit removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{specOfferId}/benefits", method = RequestMethod.POST) @ApiOperation(value = "Method for creating Spec Offer Benefit") SpecOfferBenefitResource createResource(@Valid @RequestBody final SpecOfferBenefitResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/benefits/{specOfferBenefitId}", method = RequestMethod.PUT) @ApiOperation(value = "Update Spec Offer Benefit", position = 2) MessageResource updateResource(@PathVariable("specOfferBenefitId") final Long specOfferBenefitId,
 			@RequestBody final SpecOfferBenefitResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/benefits/{specOfferBenefitId}", method = RequestMethod.GET) @ApiOperation(value = "Get Spec Offer Benefits by spec offer id", position = 3) SpecOfferBenefitResource getResource(@PathVariable("specOfferBenefitId") final Long specOfferBenefitId); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{specOfferId}/benefits/{specOfferBenefitId}", method = RequestMethod.DELETE) @ApiOperation(value = "Delete Spec Offer Benefit", position = 4) MessageResource removeResource(@PathVariable("specOfferBenefitId") final Long specOfferBenefitId); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/benefits", method = RequestMethod.GET) @ApiOperation(value = "Get Spec Offer Benefits", position = 5) PagedResultResource<SpecOfferBenefitResource> getPagedResource(final PagedRequest<SpecOfferBenefitResource> request);  }
@Test public void testDeleteSpecOfferBenefit() throws Exception { Long personId = 2L; Long id = 1L; mockMvc.perform(delete("/specoffers/{0}/benefits/{id}", personId, id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }