@Test
public void countDescriptorTest()
{

  final String keyName1 = "keyName1";
  final String keyName2 = "keyName2";
  final String keyName1Type = "string";
  final String keyName2Type = "string";
  final String valueName1 = "valueName1";
  final String valueName2 = "valueName2";
  final String valueName1Type = "double";
  final String valueName2Type = "integer";
  final String jsonSchema = "{\"keys\":\n" +
      "[{\"name\":\"" + keyName1 + "\",\"type\":\"" + keyName1Type + "\"},\n" +
      "{\"name\":\"" + keyName2 + "\",\"type\":\"" + keyName2Type + "\"}],\n" +
      "\"values\":\n" +
      "[{\"name\":\"" + valueName1 + "\",\"type\":\"" + valueName1Type + "\"},\n" +
      "{\"name\":\"" + valueName2 + "\",\"type\":\"" + valueName2Type + "\"}],\n" +
      "\"timeBuckets\":[\"1m\"]," +
      "\"dimensions\":\n" +
      "[{\"combination\":[\"" + keyName1 + "\",\"" + keyName2 + "\"],\"additionalValues\":[\"" + valueName1 +
      ":COUNT\"" + "]},\n" + "]\n" +
      "}";
  DimensionalConfigurationSchema des = new DimensionalConfigurationSchema(jsonSchema,
      AggregatorRegistry.DEFAULT_AGGREGATOR_REGISTRY);
  FieldsDescriptor fd = des.getDimensionsDescriptorIDToAggregatorIDToOutputAggregatorDescriptor().get(0).get(
      AggregatorIncrementalType.NAME_TO_ORDINAL.get("COUNT"));
  Assert.assertEquals("Indexes for type compress fields should be 0", 0,
      (int)fd.getTypeToFieldToIndex().get(Type.LONG).get("valueName1"));
}