@Test
public void testGetKey()
{

    QueryItem qiA = new QueryItem( deA, null, deA.getValueType(), deA.getAggregationType(), osA );
    QueryItem qiB = new QueryItem( deB, null, deB.getValueType(), deB.getAggregationType(), osB );
    EventQueryParams paramsA = new EventQueryParams.Builder()
        .addDimension( new BaseDimensionalObject( PERIOD_DIM_ID, DimensionType.PERIOD, Lists.newArrayList( peA, peB, peC ) ) )
        .addDimension( new BaseDimensionalObject( ORGUNIT_DIM_ID, DimensionType.ORGANISATION_UNIT, Lists.newArrayList( ouA, ouB ) ) )
        .addItem( qiA )
        .addItem( qiB )
        .build();
    EventQueryParams paramsB = new EventQueryParams.Builder()
        .addDimension( new BaseDimensionalObject( PERIOD_DIM_ID, DimensionType.PERIOD, Lists.newArrayList( peA, peB ) ) )
        .addDimension( new BaseDimensionalObject( ORGUNIT_DIM_ID, DimensionType.ORGANISATION_UNIT, Lists.newArrayList( ouA ) ) )
        .addItem( qiA )
        .addItem( qiB )
        .withGeometryOnly( true )
        .build();
    assertNotNull( paramsA.getKey() );
    assertEquals( 40, paramsA.getKey().length() );
    assertNotNull( paramsB.getKey() );
    assertEquals( 40, paramsB.getKey().length() );
    assertNotEquals( paramsA.getKey(), paramsB.getKey() );
}