CustomerController { @DeleteMapping public ResponseEntity<Customer> deleteAllUsers() { log.info("Deleting All Users"); this.customerService.deleteAllCustomers(); return ResponseEntity.noContent().build(); }  @GetMapping ResponseEntity<List<Customer>> getCustomers(); @GetMapping(value = "{customerId}", produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Customer> getCustomer(@PathVariable("customerId") @NotBlank Long customerId); @PostMapping ResponseEntity<Object> createCustomer(@Valid @RequestBody Customer customer, UriComponentsBuilder ucBuilder,
			Errors errors); @PutMapping("{customerId}") ResponseEntity<Customer> updateCustomer(@RequestBody Customer updateCustomerRequest,
			@PathVariable("customerId") Long customerId); @DeleteMapping("{customerId}") ResponseEntity<Customer> removeCustomer(@PathVariable("customerId") Long customerId); @DeleteMapping ResponseEntity<Customer> deleteAllUsers();  }
@Test @WithMockUser(roles = "ADMIN") void testDeleteAllUsers() throws Exception { BDDMockito.willDoNothing().given(this.customerService).deleteAllCustomers(); this.mockMvc.perform(MockMvcRequestBuilders.delete("/rest/customers/")).andExpect(status().isNoContent()); }