@Test
public void testGetByDataDimensionType()
{

    Program prA = createProgram( 'A' );
    DataElement deA = createDataElement( 'A', new CategoryCombo() );
    DataElement deB = createDataElement( 'B', new CategoryCombo() );
    ProgramDataElementDimensionItem pdeA = new ProgramDataElementDimensionItem( prA, deA );
    ProgramDataElementDimensionItem pdeB = new ProgramDataElementDimensionItem( prA, deB );
    ProgramIndicator piA = createProgramIndicator( 'A', prA, null, null );
    List<DimensionalItemObject> list = Lists.newArrayList( deA, deB, pdeA, pdeB, piA );
    assertEquals( Lists.newArrayList( deA, deB ), AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.DATA_ELEMENT, list ) );
    assertEquals( Lists.newArrayList( pdeA, pdeB ), AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_DATA_ELEMENT, list ) );
    assertEquals( Lists.newArrayList( piA ), AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_INDICATOR, list ) );
    assertEquals( Lists.newArrayList(), AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.PROGRAM_ATTRIBUTE, list ) );
}