@Test
public void testBinCommonIndexModel() {

  GeohashBinningStrategy<CommonIndexedPersistenceEncoding> strat =
      new GeohashCommonIndexedBinningStrategy(4);
  CommonIndexedPersistenceEncoding data1 = createCommonIndexData(new Coordinate(0, 0));
  CommonIndexedPersistenceEncoding data2 = createCommonIndexData(new Coordinate(40, 40));
  String bin1 = strat.binEntry(data1)[0];
  String bin2 = strat.binEntry(data2)[0];
  assertThat(bin1, is(not(bin2)));
  strat = new GeohashCommonIndexedBinningStrategy(1);
  data1 = createCommonIndexData(new Coordinate(0, 0));
  data2 = createCommonIndexData(new Coordinate(0.01, 0.01));
  bin1 = strat.binEntry(data1)[0];
  bin2 = strat.binEntry(data2)[0];
  // even though they are different coords, they are binned together.
  assertThat(bin1, is(bin2));
}