SecurityRoleRestController { @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_ROLES_DELETE) public SecurityRole deleteSecurityRole(@PathVariable("securityRoleName") String securityRoleName) { return securityRoleService.deleteSecurityRole(new SecurityRoleKey(securityRoleName)); }  @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_POST) SecurityRole createSecurityRole(@RequestBody SecurityRoleCreateRequest securityRoleCreateRequest); @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_SECURITY_ROLES_DELETE) SecurityRole deleteSecurityRole(@PathVariable("securityRoleName") String securityRoleName); @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_GET) SecurityRole getSecurityRole(@PathVariable("securityRoleName") String securityRoleName); @RequestMapping(value = SECURITY_ROLES_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_SECURITY_ROLES_ALL_GET) SecurityRoleKeys getSecurityRoles(); @RequestMapping(value = SECURITY_ROLES_URI_PREFIX + "/{securityRoleName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_SECURITY_ROLES_PUT) SecurityRole updateSecurityRole(@PathVariable("securityRoleName") String securityRoleName,
        @RequestBody SecurityRoleUpdateRequest securityRoleUpdateRequest);  }
@Test public void testDeleteSecurityRole() { SecurityRole securityRole = new SecurityRole(SECURITY_ROLE, DESCRIPTION); when(securityRoleService.deleteSecurityRole(new SecurityRoleKey(SECURITY_ROLE))).thenReturn(securityRole); SecurityRole result = securityRoleRestController.deleteSecurityRole(SECURITY_ROLE); assertEquals(securityRole, result); verify(securityRoleService).deleteSecurityRole(new SecurityRoleKey(SECURITY_ROLE)); verifyNoMoreInteractions(securityRoleService); }