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