@Test
public void verifyGetColumnsWithAttributeOrgUnitTypeAndCoordinatesReturnsFetchesCoordinatesFromOrgUnite()
{

    // Given
    DataElement deA = createDataElement( 'A', ValueType.ORGANISATION_UNIT, AggregationType.NONE );
    DimensionalObject periods = new BaseDimensionalObject( DimensionalObject.PERIOD_DIM_ID, DimensionType.PERIOD,
        Lists.newArrayList( MonthlyPeriodType.getPeriodFromIsoString( "201701" ) ) );
    DimensionalObject orgUnits = new BaseDimensionalObject( DimensionalObject.ORGUNIT_DIM_ID,
        DimensionType.ORGANISATION_UNIT, "ouA", Lists.newArrayList( createOrganisationUnit( 'A' ) ) );
    QueryItem qiA = new QueryItem( deA, null, deA.getValueType(), deA.getAggregationType(), null );
    // When
    EventQueryParams params = new EventQueryParams.Builder()
        .addDimension( periods )
        .addDimension( orgUnits )
        .addItem( qiA )
        .withCoordinateField( deA.getUid() )
        .withSkipData( true )
        .withSkipMeta( false )
        .build();
    final List<String> columns = this.subject.getSelectColumns( params );
    // Then
    assertThat( columns, hasSize( 3 ) );
    assertThat( columns, containsInAnyOrder( "ax.\"pe\"", "ax.\"ou\"",
        "'[' || round(ST_X(ST_Centroid(\"" + deA.getUid() + "_geom"
            + "\"))::numeric, 6) || ',' || round(ST_Y(ST_Centroid(\"" + deA.getUid() + "_geom"
            + "\"))::numeric, 6) || ']' as \"" + deA.getUid() + "_geom" + "\"" ) );
}