PersonLanguageController extends BaseController implements CrudController<PersonLanguageResource, PersonLanguageResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{personId}/languages/{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, "PersonLanguage removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{personId}/languages", method = RequestMethod.POST) PersonLanguageResource createResource(@Valid @RequestBody final PersonLanguageResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{personId}/languages/{id}", method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final PersonLanguageResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{personId}/languages/{id}", method = RequestMethod.GET) PersonLanguageResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{personId}/languages/{id}", method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{personId}/languages", method = RequestMethod.GET) PagedResultResource<PersonLanguageResource> getPagedResource(final PagedRequest<PersonLanguageResource> request);  }
@Test public void testDeleteDepatmentLanguage() throws Exception { Long personId = 2L; Long languageId = 1L; mockMvc.perform( delete("/persons/{personId}/languages/{languageId}", personId, languageId)).andExpect(status().is(204)); verify(facade).removeResource(languageId); }