### Question:
PersonController { @RequestMapping(value="/{id}", method=RequestMethod.DELETE) public void deletePerson (@PathVariable(value="id")String id){ if(null == id){ throw new BadRequestException("Id must be valid for request"); } this.personRepository.delete(id); }  @RequestMapping(method=RequestMethod.GET) Person findPerson(@RequestParam(value = "displayName")String displayName); @RequestMapping(method = RequestMethod.POST) Person addPerson(@RequestBody final Person model, HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/{id}", method = RequestMethod.GET) Person getPerson(@PathVariable(value="id")String id); @RequestMapping(value="/{id}", method=RequestMethod.PUT) Person updatePerson(@PathVariable(value="id")String id, @RequestBody Person person); @RequestMapping(value="/{id}", method=RequestMethod.DELETE) void deletePerson(@PathVariable(value="id")String id);  }### Answer:
@Test public void testDeletePerson() throws Exception { mockMvc.perform(delete("/persons/" + personId)).andExpect(status().isOk()); }