@Test
public void testBinSimpleFeature() {

  SimpleFeature feature1 = createSimpleFeature(new Coordinate(0, 0));
  // same coord, but different name, make sure it still works in this simple case
  SimpleFeature feature2 = createSimpleFeature(new Coordinate(40, 40));
  SimpleFeature feature3 = createSimpleFeature(new Coordinate(40, 40));
  GeohashBinningStrategy<SimpleFeature> strat = new GeohashSimpleFeatureBinningStrategy(4);
  String bin1 = strat.binEntry(feature1)[0];
  String bin2 = strat.binEntry(feature2)[0];
  String bin3 = strat.binEntry(feature3)[0];
  assertThat(bin1, is(not(bin2)));
  assertThat(bin2, is(bin3));
  strat = new GeohashSimpleFeatureBinningStrategy(1);
  feature1 = createSimpleFeature(new Coordinate(0, 0));
  feature2 = createSimpleFeature(new Coordinate(0.01, 0.01));
  bin1 = strat.binEntry(feature1)[0];
  bin2 = strat.binEntry(feature2)[0];
  // even though they are different coords, they are binned together due to precision.
  assertThat(bin1, is(bin2));
}