@Test
public void testGetSecurityFunctionEntitySecurityFunctionNoExists()
{

    // Mock the external calls.
    when(securityFunctionDao.getSecurityFunctionByName(SECURITY_FUNCTION)).thenReturn(null);
    // Specify the expected exception.
    expectedException.expect(ObjectNotFoundException.class);
    expectedException.expectMessage(String.format("Security function with name \"%s\" doesn't exist.", SECURITY_FUNCTION));
    // Call the method under test.
    securityFunctionDaoHelper.getSecurityFunctionEntity(SECURITY_FUNCTION);
    // Verify the external calls.
    verify(securityFunctionDao).getSecurityFunctionByName(SECURITY_FUNCTION);
    verifyNoMoreInteractionsHelper();
}