@Test
public void testDistribution() {

  final Map<ByteArray, Long> counts = new HashMap<>();
  int total = 0;
  for (double x = 90; x < 180; x += 0.05) {
    for (double y = 50; y < 90; y += 0.5) {
      final NumericRange dimension1Range = new NumericRange(x, x + 0.002);
      final NumericRange dimension2Range = new NumericRange(y - 0.002, y);
      final MultiDimensionalNumericData sfcIndexedRange =
          new BasicNumericDataset(new NumericData[] {dimension1Range, dimension2Range});
      for (final byte[] id : hashIdexStrategy.getInsertionPartitionKeys(sfcIndexedRange)) {
        final Long count = counts.get(new ByteArray(id));
        final long nextcount = count == null ? 1 : count + 1;
        counts.put(new ByteArray(id), nextcount);
        total++;
      }
    }
  }
  final double mean = total / counts.size();
  double diff = 0.0;
  for (final Long count : counts.values()) {
    diff += Math.pow(mean - count, 2);
  }
  final double sd = Math.sqrt(diff / counts.size());
  assertTrue(sd < (mean * 0.18));
}