PersonController extends BaseController implements CrudController<PersonResource, PersonResourceList> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) @ApiOperation(value = "Delete Person", position = 4) public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing person with id: {}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "Person removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(method = RequestMethod.POST) @ApiOperation(value = "Create Person", position = 1) PersonResource createResource(@Valid @RequestBody final PersonResource personResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.PUT) @ApiOperation(value = "Update Person", position = 2) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final PersonResource personResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.GET) @ApiOperation(value = "Get Person by id", position = 3) PersonResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) @ApiOperation(value = "Delete Person", position = 4) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.GET) @ApiOperation(value = "Get Persons") PagedResultResource<PersonResource> getPagedResource(final PagedRequest<PersonResourceList> request);  }
@Test public void testDeletePerson() throws Exception { Long id = 1L; mockMvc.perform(delete("/persons/{id}", id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }