@Test
public void testConstructorAgreement()
{

  DimensionalConfigurationSchema expectedEventSchema = new DimensionalConfigurationSchema(
      SchemaUtils.jarResourceFileToString("adsGenericEventSchemaAdditional.json"),
      AggregatorRegistry.DEFAULT_AGGREGATOR_REGISTRY);
  @SuppressWarnings("unchecked")
  List<Object> publisherEnumVals = (List<Object>)((List)Lists.newArrayList("twitter", "facebook", "yahoo", "google",
      "bing", "amazon"));
  @SuppressWarnings("unchecked")
  List<Object> advertiserEnumVals = (List<Object>)((List)Lists.newArrayList("starbucks", "safeway", "mcdonalds",
      "macys", "taco bell", "walmart", "khol's", "san diego zoo", "pandas", "jack in the box", "tomatina",
      "ron swanson"));
  @SuppressWarnings("unchecked")
  List<Object> locationEnumVals = (List<Object>)((List)Lists.newArrayList("N", "LREC", "SKY", "AL", "AK", "AZ", "AR",
      "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID"));
  List<Key> keys = Lists.newArrayList(new Key("publisher", Type.STRING, publisherEnumVals),
      new Key("advertiser", Type.STRING, advertiserEnumVals), new Key("location", Type.STRING, locationEnumVals));
  List<TimeBucket> timeBuckets = Lists.newArrayList(TimeBucket.MINUTE, TimeBucket.HOUR, TimeBucket.DAY);
  List<Value> values = Lists.newArrayList(new Value("impressions", Type.LONG, Sets.newHashSet("SUM", "COUNT")),
      new Value("clicks", Type.LONG, Sets.newHashSet("SUM", "COUNT")),
      new Value("cost", Type.DOUBLE, Sets.newHashSet("SUM", "COUNT")),
      new Value("revenue", Type.DOUBLE, Sets.newHashSet("SUM", "COUNT")));
  Map<String, Set<String>> valueToAggregators = Maps.newHashMap();
  valueToAggregators.put("impressions", Sets.newHashSet("MIN", "MAX"));
  valueToAggregators.put("clicks", Sets.newHashSet("MIN", "MAX"));
  valueToAggregators.put("cost", Sets.newHashSet("MIN", "MAX"));
  valueToAggregators.put("revenue", Sets.newHashSet("MIN", "MAX"));
  Set<String> emptySet = Sets.newHashSet();
  Map<String, Set<String>> emptyMap = Maps.newHashMap();
  List<DimensionsCombination> dimensionsCombinations = Lists.newArrayList(
      new DimensionsCombination(new Fields(emptySet), emptyMap),
      new DimensionsCombination(new Fields(Sets.newHashSet("location")), emptyMap),
      new DimensionsCombination(new Fields(Sets.newHashSet("advertiser")), valueToAggregators),
      new DimensionsCombination(new Fields(Sets.newHashSet("publisher")), valueToAggregators),
      new DimensionsCombination(new Fields(Sets.newHashSet("advertiser", "location")), emptyMap),
      new DimensionsCombination(new Fields(Sets.newHashSet("publisher", "location")), emptyMap),
      new DimensionsCombination(new Fields(Sets.newHashSet("publisher", "advertiser")), emptyMap),
      new DimensionsCombination(new Fields(Sets.newHashSet("publisher", "advertiser", "location")), emptyMap));
  DimensionalConfigurationSchema eventSchema = new DimensionalConfigurationSchema(keys,
      values, timeBuckets, dimensionsCombinations, AggregatorRegistry.DEFAULT_AGGREGATOR_REGISTRY);
  logger.debug("expected {}", expectedEventSchema.getDimensionsDescriptorIDToValueToOTFAggregator());
  logger.debug("actual   {}", eventSchema.getDimensionsDescriptorIDToValueToOTFAggregator());
  Assert.assertEquals(expectedEventSchema, eventSchema);
}