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