### Question:
HistogramBin implements Comparable,
        Cloneable, PublicCloneable, Serializable { public boolean accepts(double value) { if (Double.isNaN(value)) { return false; } if (value < this.lowerBound) { return false; } if (value > this.upperBound) { return false; } if (value == this.lowerBound) { return this.includeLowerBound; } if (value == this.upperBound) { return this.includeUpperBound; } return true; } HistogramBin(double lowerBound, double upperBound);  HistogramBin(double lowerBound, double upperBound,
                              boolean includeLowerBound,
                              boolean includeUpperBound); double getLowerBound(); double getUpperBound(); int getItemCount(); void setItemCount(int count); boolean accepts(double value); boolean overlapsWith(HistogramBin bin); @Override int compareTo(Object obj); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testAccepts() { HistogramBin bin1 = new HistogramBin(1.0, 2.0); assertFalse(bin1.accepts(0.0)); assertTrue(bin1.accepts(1.0)); assertTrue(bin1.accepts(1.5)); assertTrue(bin1.accepts(2.0)); assertFalse(bin1.accepts(2.1)); assertFalse(bin1.accepts(Double.NaN)); HistogramBin bin2 = new HistogramBin(1.0, 2.0, false, false); assertFalse(bin2.accepts(0.0)); assertFalse(bin2.accepts(1.0)); assertTrue(bin2.accepts(1.5)); assertFalse(bin2.accepts(2.0)); assertFalse(bin2.accepts(2.1)); assertFalse(bin2.accepts(Double.NaN)); }