@Test
public void testAllCombinationsGeneration()
{

  DimensionalConfigurationSchema schema = new DimensionalConfigurationSchema(SchemaUtils.jarResourceFileToString("adsGenericEventSimpleAllCombinations.json"), AggregatorRegistry.DEFAULT_AGGREGATOR_REGISTRY);
  Set<DimensionsDescriptor> dimensionsDescriptors = Sets.newHashSet();
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(new HashSet<String>())));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("publisher"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("advertiser"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("location"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("publisher", "advertiser"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("publisher", "location"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("advertiser", "location"))));
  dimensionsDescriptors.add(new DimensionsDescriptor(TimeBucket.MINUTE, new Fields(Sets.newHashSet("publisher", "advertiser", "location"))));
  Set<DimensionsDescriptor> actualDimensionsDescriptors = Sets.newHashSet();
  for (DimensionsDescriptor dimensionsDescriptor : schema.getDimensionsDescriptorToID().keySet()) {
    actualDimensionsDescriptors.add(dimensionsDescriptor);
  }
  List<DimensionsDescriptor> ddList = Lists.newArrayList(dimensionsDescriptors);
  List<DimensionsDescriptor> ddActualList = Lists.newArrayList(actualDimensionsDescriptors);
  Collections.sort(ddList);
  Collections.sort(ddActualList);
  Assert.assertEquals(dimensionsDescriptors, actualDimensionsDescriptors);
}