@Test
public void testNoGeometry() throws SchemaException {

  SimpleFeatureType noGeoType = DataUtilities.createType("testNoGeo", "name:String");
  SimpleFeature noGeoFeature =
      SimpleFeatureBuilder.build(noGeoType, new Object[] {"NAME!"}, "NAME!");
  GeohashBinningStrategy<SimpleFeature> sfStrat = new GeohashSimpleFeatureBinningStrategy(4);
  // If the feature does not have a geometry, null is returned by binEntry.
  String[] bin = sfStrat.binEntry(noGeoFeature);
  assertNull(bin);
  GeohashBinningStrategy<CommonIndexedPersistenceEncoding> ciStrat =
      new GeohashCommonIndexedBinningStrategy(4, "NotTheGeoField");
  // we are looking in the wrong field for the geometry type here, so therefore no Geometry will
  // be found.
  bin = ciStrat.binEntry(createCommonIndexData(new Coordinate(1, 1, 1)));
  assertNull(bin);
}