### Question:
RangeBinner extends AbstractBinner<T> { ThreeTuple<Double, Double, Object> getMinMaxBinValueValue(T data) { ThreeTuple<Double, Double, Object> minMaxBin = null; Object sampleValue = myDataToValue.apply(data); if (sampleValue != null) { double sampleDoubleValue = myValueToDouble.applyAsDouble(sampleValue); double min = round(Math.floor(round(sampleDoubleValue / myCriteria.getBinWidth())) * myCriteria.getBinWidth()); double max = round(min + myCriteria.getBinWidth()); Object binValue = myDoubleToValue.apply(Double.valueOf(min), sampleValue.getClass()); minMaxBin = new ThreeTuple<>(Double.valueOf(min), Double.valueOf(max), binValue); } return minMaxBin; } RangeBinner(RangeCriteria criteria, Function<T, ?> dataToValue, ToDoubleFunction<Object> valueToDouble,
            BiFunction<Double, Class<?>, Object> doubleToValue);  RangeBinner(List<Bin<T>> bins);   }### Answer:
@Test public void testGetMinMaxBinValueValue() { RangeCriteria criteria = new RangeCriteria(); criteria.setBinWidth(0.1); RangeBinner<Point2D.Double> binner = new RangeBinner<>(criteria, p -> Double.valueOf(p.x), o -> ((Double)o).doubleValue(), (v, c) -> Double.valueOf(v)); ThreeTuple<Double, Double, Object> t; t = binner.getMinMaxBinValueValue(new Point2D.Double(0, 0)); Assert.assertEquals(Double.valueOf(0), t.getFirstObject()); Assert.assertEquals(Double.valueOf(0.1), t.getSecondObject()); Assert.assertEquals(Double.valueOf(0), t.getThirdObject()); t = binner.getMinMaxBinValueValue(new Point2D.Double(0.01, 0)); Assert.assertEquals(Double.valueOf(0), t.getFirstObject()); Assert.assertEquals(Double.valueOf(0.1), t.getSecondObject()); Assert.assertEquals(Double.valueOf(0), t.getThirdObject()); t = binner.getMinMaxBinValueValue(new Point2D.Double(0.3, 0)); Assert.assertEquals(Double.valueOf(0.3), t.getFirstObject()); Assert.assertEquals(Double.valueOf(0.4), t.getSecondObject()); Assert.assertEquals(Double.valueOf(0.3), t.getThirdObject()); }