@Test
public void testDeleteSecurityFunction() throws Exception
{

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