### Question:
SpatialKeyAlgo implements KeyAlgo { @Override public long encode( GHPoint coord ) { return encode(coord.lat, coord.lon); } SpatialKeyAlgo( int allBits ); int getBits(); int getExactPrecision(); SpatialKeyAlgo bounds( BBox box ); @Override SpatialKeyAlgo setBounds( double minLonInit, double maxLonInit, double minLatInit, double maxLatInit ); @Override long encode( GHPoint coord ); @Override final long encode( double lat, double lon ); @Override final void decode( long spatialKey, GHPoint latLon ); @Override String toString();  }### Answer:
@Test public void testEncode() { SpatialKeyAlgo algo = new SpatialKeyAlgo(32); long val = algo.encode(-24.235345f, 47.234234f); assertEquals("01100110101000111100000110010100", BitUtil.BIG.toLastBitString(val, 32)); }