@Test
public void testEncodeToGeohash() {

  Coordinate coord = new Coordinate(49.619, -5.821);
  Point point = geoFactory.createPoint(coord);
  // calculated this beforehand.
  String hash = "gbgf78c78u5b";
  for (int i = 1; i < hash.length(); i++) {
    assertThat(hash.substring(0, i), is(GeohashBinningStrategy.encodeToGeohash(point, i)));
  }
}