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