@Test
public void testGetSecurityFunction() throws Exception
{

    SecurityFunction securityFunction = new SecurityFunction(SECURITY_FUNCTION);
    when(securityFunctionService.getSecurityFunction(new SecurityFunctionKey(SECURITY_FUNCTION))).thenReturn(securityFunction);
    // Retrieve the security function.
    SecurityFunction resultSecurityFunction = securityFunctionRestController.getSecurityFunction(SECURITY_FUNCTION);
    // Verify the external calls.
    verify(securityFunctionService).getSecurityFunction(new SecurityFunctionKey(SECURITY_FUNCTION));
    verifyNoMoreInteractions(securityFunctionService);
    // Validate the returned object.
    assertEquals(securityFunction, resultSecurityFunction);
}