Util { public static int computeBinCount(int accuracy) { if (accuracy < 0 || accuracy > MAX_ACCURACY) { throw new IllegalArgumentException("accuracy is not in the range 0 ... " + MAX_ACCURACY); } return (int) Math.pow(10, accuracy); }  static String getFeatureName(SimpleFeature simpleFeature); static double getBinWidth(Histogram histogram); static int computeBinCount(int accuracy); static final int MAX_ACCURACY; }
@Test public void testComputeBinCount() throws Exception { assertEquals(1000, Util.computeBinCount(3)); assertEquals(10000, Util.computeBinCount(4)); assertEquals(1000000, Util.computeBinCount(6)); }