@Test
public void testGetUidMapIsSchemeCode()
{

    DataElement deA = new DataElement( "NameA" );
    DataElement deB = new DataElement( "NameB" );
    DataElement deC = new DataElement( "NameC" );
    deA.setUid( "A123456789A" );
    deB.setUid( "A123456789B" );
    deC.setUid( "A123456789C" );
    deA.setCode( "CodeA" );
    deB.setCode( "CodeB" );
    deC.setCode( null );
    List<DataElement> elements = Lists.newArrayList( deA, deB, deC );
    Map<String, String> map = DimensionalObjectUtils.getDimensionItemIdSchemeMap( elements, IdScheme.CODE );
    assertEquals( 3, map.size() );
    assertEquals( "CodeA", map.get( "A123456789A" ) );
    assertEquals( "CodeB", map.get( "A123456789B" ) );
    assertEquals( null, map.get( "A123456789C" ) );
}