@Test
public void testDeleteSecurityRoleFunction()
{

    // Create a security role to function mapping key.
    SecurityRoleFunctionKey securityRoleFunctionKey = new SecurityRoleFunctionKey(SECURITY_ROLE, SECURITY_FUNCTION);
    // Create a security role function.
    SecurityRoleFunction securityRoleFunction = new SecurityRoleFunction(ID, securityRoleFunctionKey);
    // Mock the external calls.
    when(securityRoleFunctionService.deleteSecurityRoleFunction(securityRoleFunctionKey)).thenReturn(securityRoleFunction);
    // Call the method under test.
    SecurityRoleFunction result = securityRoleFunctionRestController.deleteSecurityRoleFunction(SECURITY_ROLE, SECURITY_FUNCTION);
    // Validate the result.
    assertEquals(securityRoleFunction, result);
    // Verify the external calls.
    verify(securityRoleFunctionService).deleteSecurityRoleFunction(securityRoleFunctionKey);
    verifyNoMoreInteractions(securityRoleFunctionService);
}