@Test
public void testCreateSecurityRoleFunction()
{

    // Create a security role function create request.
    SecurityRoleFunctionCreateRequest securityRoleFunctionCreateRequest =
        new SecurityRoleFunctionCreateRequest(new SecurityRoleFunctionKey(SECURITY_ROLE, SECURITY_FUNCTION));
    // Create a security role function.
    SecurityRoleFunction securityRoleFunction = new SecurityRoleFunction(ID, new SecurityRoleFunctionKey(SECURITY_ROLE, SECURITY_FUNCTION));
    // Mock the external calls.
    when(securityRoleFunctionService.createSecurityRoleFunction(securityRoleFunctionCreateRequest)).thenReturn(securityRoleFunction);
    // Call the method under test.
    SecurityRoleFunction result = securityRoleFunctionRestController.createSecurityRoleFunction(securityRoleFunctionCreateRequest);
    // Validate the result.
    assertEquals(securityRoleFunction, result);
    // Verify the external calls.
    verify(securityRoleFunctionService).createSecurityRoleFunction(securityRoleFunctionCreateRequest);
    verifyNoMoreInteractions(securityRoleFunctionService);
}