DegreeController extends BaseController implements CrudController<DegreeResource, DegreeResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/degrees/{id}", method = RequestMethod.DELETE) public MessageResource removeResource(@PathVariable("id") final Long id) { LOGGER.info("Removing degree:{}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "Degree removed"); }  @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = { "/degrees", "/persons/{personId}/degrees" }, method = RequestMethod.GET) PagedResultResource<DegreeResource> getPagedResource(final PagedRequest<DegreeResource> request); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/degrees/{id}", method = RequestMethod.GET) DegreeResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/degrees", method = RequestMethod.POST) DegreeResource createResource(@Valid @RequestBody final DegreeResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/degrees/{id}", method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final DegreeResource resource); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/degrees/{id}", method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id);  }
@Test public void testDeleteDegree() throws Exception { Long id = 1L; mockMvc.perform(delete("/degrees/{id}", id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }