@Test
public void testValidateGlobalAttributeDefinitionNoExists()
{

    // Create a global attribute definition key.
    GlobalAttributeDefinitionKey globalAttributeDefinitionKey =
        new GlobalAttributeDefinitionKey(GLOBAL_ATTRIBUTE_DEFINITON_LEVEL, GLOBAL_ATTRIBUTE_DEFINITON_NAME);
    // Mock calls to external methods.
    when(globalAttributeDefinitionDao.getGlobalAttributeDefinitionByKey(globalAttributeDefinitionKey)).thenReturn(null);
    // Call the method under test.
    globalAttributeDefinitionDaoHelper.validateGlobalAttributeDefinitionNoExists(globalAttributeDefinitionKey);
    // Verify the external calls.
    verify(globalAttributeDefinitionDao).getGlobalAttributeDefinitionByKey(globalAttributeDefinitionKey);
    verifyNoMoreInteractions(globalAttributeDefinitionDao);
}