### Question:
FacilityAdapterController { @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void remove(@PathVariable String id) { facilityAdapterService.deleteAdapter(id); }  @ResponseStatus(HttpStatus.CREATED) @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) HttpHeaders createAdapterType(@RequestBody FacilityAdapter adapter); @RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) void updateAdapterType(@RequestBody FacilityAdapter adapter); @RequestMapping(value = "/{id}", method = RequestMethod.GET) FacilityAdapter read(@PathVariable String id); @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) void remove(@PathVariable String id); @RequestMapping(value = "/pagenumber/{pagenumber}/pagesize/{pagesize}", method = RequestMethod.GET) Page<FacilityAdapter> findAllAdapter(@PathVariable("pagenumber") int currentPage,
         @PathVariable("pagesize") int pageSize); @RequestMapping(method = RequestMethod.GET) List<FacilityAdapter> findAll();  }### Answer:
@Test public void deleteFacilityAdapterExample() throws Exception { SetOperations<String, String> setop = Mockito.mock(SetOperations.class); when(redis.opsForSet()).thenReturn(setop); when(setop.isMember(anyString(), anyString())).thenReturn(true); when(setop.remove(anyString(), anyString())).thenReturn(1l); FacilityAdapter adapter = createAdapter(); facilityAdapterRepo.save(adapter); this.mockMvc .perform(delete("/v1/facilityadapter/" + adapter.getId() + "") .content("{\"id\":\"" + adapter.getId() + "\"}")) .andExpect(status().isOk()) .andDo(document("facilityadapter-deleteById-example", requestFields(fieldWithPath("id") .description("ID of the facility adapter, created by flowgate")))) .andReturn(); }