@Test
public void testGetGlobalAttributeDefinitions()
{

    // Create a list of global attribute definition keys.
    GlobalAttributeDefinitionKeys globalAttributeDefinitionKeys = new GlobalAttributeDefinitionKeys(Arrays
        .asList(new GlobalAttributeDefinitionKey(GLOBAL_ATTRIBUTE_DEFINITON_LEVEL, GLOBAL_ATTRIBUTE_DEFINITON_NAME),
            new GlobalAttributeDefinitionKey(GLOBAL_ATTRIBUTE_DEFINITON_LEVEL, GLOBAL_ATTRIBUTE_DEFINITON_NAME_2)));
    // Mock calls to external methods.
    when(globalAttributeDefinitionService.getGlobalAttributeDefinitionKeys()).thenReturn(globalAttributeDefinitionKeys);
    // Call the method under test.
    GlobalAttributeDefinitionKeys response = globalAttributeDefinitionRestController.getGlobalAttributeDefinitions();
    // Verify the external calls.
    verify(globalAttributeDefinitionService).getGlobalAttributeDefinitionKeys();
    verifyNoMoreInteractions(globalAttributeDefinitionService);
    // Validate the response.
    assertEquals(new GlobalAttributeDefinitionKeys(Arrays
        .asList(new GlobalAttributeDefinitionKey(GLOBAL_ATTRIBUTE_DEFINITON_LEVEL, GLOBAL_ATTRIBUTE_DEFINITON_NAME),
            new GlobalAttributeDefinitionKey(GLOBAL_ATTRIBUTE_DEFINITON_LEVEL, GLOBAL_ATTRIBUTE_DEFINITON_NAME_2))), response);
}