EnrolmentEnrolmentSubjectController extends BaseController implements CrudController<EnrolmentEnrolmentSubjectResource, EnrolmentEnrolmentSubjectResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{enrolmentId}/enrolmentsubjects/{id}", method = RequestMethod.DELETE) public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing enrolment enrolment subject with id : {} ", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "Enrolment Enrolment Subject Removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{enrolmentId}/enrolmentsubjects", method = RequestMethod.POST) EnrolmentEnrolmentSubjectResource createResource(@Valid @RequestBody final  EnrolmentEnrolmentSubjectResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{enrolmentId}/enrolmentsubjects/{id}", method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id, 
		@Valid @RequestBody final EnrolmentEnrolmentSubjectResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{enrolmentId}/enrolmentsubjects/{id}", method = RequestMethod.GET) EnrolmentEnrolmentSubjectResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{enrolmentId}/enrolmentsubjects/{id}", method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = { "/{enrolmentId}/enrolmentsubjects" }, method = RequestMethod.GET) PagedResultResource<EnrolmentEnrolmentSubjectResource> getPagedResource(final PagedRequest<EnrolmentEnrolmentSubjectResource> request);  }
@Test public void testDeleteEnrolmentEnrolmentSubject() throws Exception { Long enrolmentId = 2L; Long enrolmentSubjectId = 5L; mockMvc.perform( delete("/enrolments/{enrolmentId}/enrolmentsubjects/{enrolmentSubjectId}", enrolmentId, enrolmentSubjectId)).andExpect( status().is(204)); verify(facade).removeResource(enrolmentSubjectId); }