@Test
public void testGetSecurityRoleEntitySecurityRoleNoExists()
{

    // Specify the expected exception.
    expectedException.expect(ObjectNotFoundException.class);
    expectedException.expectMessage(String.format("Security role with name \"%s\" doesn't exist.", SECURITY_ROLE));
    // Mock the external calls.
    when(securityRoleDao.getSecurityRoleByName(SECURITY_ROLE)).thenReturn(null);
    // Call the method under test.
    securityRoleDaoHelper.getSecurityRoleEntity(SECURITY_ROLE);
    // Verify the external calls.
    verify(securityRoleDao).getSecurityRoleByName(SECURITY_ROLE);
    verifyNoMoreInteractionsHelper();
}