@Test
public void testGetTablePartitionsFromQuery()
{

    DataQueryParams params = DataQueryParams.newBuilder()
        .withPeriods( Lists.newArrayList( q1, q2, q3 ) )
        .build();
    Partitions partitions = PartitionUtils.getPartitions( params, AnalyticsTableType.DATA_VALUE );
    assertEquals( 3, partitions.getPartitions().size() );
    assertTrue( partitions.getPartitions().contains( 2018 ) );
    assertTrue( partitions.getPartitions().contains( 2019 ) );
    assertTrue( partitions.getPartitions().contains( 0 ) );
    params = DataQueryParams.newBuilder()
        .withPeriods( Lists.newArrayList( q1 ) )
        .build();
    partitions = PartitionUtils.getPartitions( params, AnalyticsTableType.ORG_UNIT_TARGET );
    assertEquals( 1, partitions.getPartitions().size() );
    assertTrue( partitions.getPartitions().contains( 2018 ) );
}