### Question:
DatabaseController { @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/report/{reportCode}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<SimpleRestResponse<Map>> deleteDumpReport(@PathVariable String reportCode) { logger.debug("Deleting dump report -> code {}", reportCode); this.getDatabaseService().deleteDumpReport(reportCode); logger.debug("Deleted dump report -> {}", reportCode); Map<String, String> response = new HashMap<>(); response.put("code", reportCode); return new ResponseEntity<>(new SimpleRestResponse<>(response), HttpStatus.OK); }  @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<PagedRestResponse<ShortDumpReportDto>> getDumpReports(@Valid RestListRequest requestList); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<Map>> getStatus(); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/initBackup", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<List<ComponentDto>>> initBackup(); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/startBackup", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<Map>> startBackup(); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/restoreBackup/{reportCode}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<Map>> restoreBackup(@PathVariable String reportCode); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/report/{reportCode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<DumpReportDto>> getDumpReport(@PathVariable String reportCode); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/report/{reportCode}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<SimpleRestResponse<Map>> deleteDumpReport(@PathVariable String reportCode); @RestAccessControl(permission = Permission.SUPERUSER) @RequestMapping(value = "/report/{reportCode}/dump/{dataSource}/{tableName}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<RestResponse<Map, Map>> getTableDump(@PathVariable String reportCode,
            @PathVariable String dataSource, @PathVariable String tableName); DatabaseValidator getDatabaseValidator(); void setDatabaseValidator(DatabaseValidator databaseValidator); IDatabaseService getDatabaseService(); void setDatabaseService(IDatabaseService databaseService);  }### Answer:
@Test public void deleteReport() throws Exception { UserDetails user = new OAuth2TestUtils.UserBuilder("jack_bauer", "0x24").grantedToRoleAdmin().build(); String accessToken = mockOAuthInterceptor(user); String xml = null; DataSourceDumpReport report = new DataSourceDumpReport(xml); when(databaseManager.getBackupReport(ArgumentMatchers.anyString())).thenReturn(report); ResultActions result = mockMvc.perform( delete("/database/report/{reportCode}", new Object[]{"reportCode"}) .header("Authorization", "Bearer " + accessToken)); result.andExpect(status().isOk()); Mockito.verify(databaseService, Mockito.times(1)).deleteDumpReport("reportCode"); }