NestedAggGeoHashGrid extends GeoHashGrid { @Override public Number computeCellValue(Map<String,Object> geogridBucket) { List<Map<String,Object>> aggBuckets = super.pluckAggBuckets(geogridBucket, nestedAggKey); Number rasterValue = 0; switch (selectionStrategy) { case SELECT_SMALLEST: rasterValue = selectSmallest(aggBuckets); break; case SELECT_LARGEST: rasterValue = selectLargest(aggBuckets); break; } return rasterValue; }  @Override void setParams(List<String> params); @Override Number computeCellValue(Map<String,Object> geogridBucket); String getNestedAggKey(); String getMetricKey(); String getValueKey(); String getSelectionStrategy(); String getRasterStrategy(); Map<String, Integer> getTermsMap();  }
@Test public void testComputeCellValue() { Number rasterValue = geohashGrid.computeCellValue(TestUtil.createAggBucket(NestedAggGeoHashGrid.DEFAULT_AGG_KEY, AGG_RESULTS)); assertEquals(5, rasterValue); }