@Test
public void testHistogram() {

  Histogram.BinScheme scheme = new Histogram.ConstantBinScheme(12, -5, 5);
  Histogram hist = new Histogram(scheme);
  for (int i = -5; i < 5; i++) {
    hist.record(i);
  }
  for (int i = 0; i < 10; i++) {
    assertEquals(scheme.fromBin(i + 1), hist.value(i / 10.0 + EPS), EPS);
  }
}