PartnerController extends BaseController implements CrudController<PartnerResource, PartnerResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing partner with id: {}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "Partner removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(method = RequestMethod.POST) PartnerResource createResource(@Valid @RequestBody final PartnerResource partnerResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final PartnerResource partnerResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.GET) PartnerResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.GET) PagedResultResource<PartnerResource> getPagedResource(final PagedRequest<PartnerResource> request);  }
@Test public void testDeletePartner() throws Exception { Long id = 1L; mockMvc.perform(delete("/partners/{id}", id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }