### Question:
HistogramBin implements Comparable,
        Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof HistogramBin)) { return false; } HistogramBin that = (HistogramBin) obj; if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (this.includeLowerBound != that.includeLowerBound) { return false; } if (this.includeUpperBound != that.includeUpperBound) { return false; } if (this.itemCount != that.itemCount) { return false; } 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 testEquals() { HistogramBin b1 = new HistogramBin(1.0, 2.0); HistogramBin b2 = new HistogramBin(1.0, 2.0); assertEquals(b1, b2); assertEquals(b2, b1); b1 = new HistogramBin(1.1, 2.0, true, true); assertFalse(b1.equals(b2)); b2 = new HistogramBin(1.1, 2.0, true, true); assertEquals(b1, b2); b1 = new HistogramBin(1.1, 2.2, true, true); assertFalse(b1.equals(b2)); b2 = new HistogramBin(1.1, 2.2, true, true); assertEquals(b1, b2); b1 = new HistogramBin(1.1, 2.2, false, true); assertFalse(b1.equals(b2)); b2 = new HistogramBin(1.1, 2.2, false, true); assertEquals(b1, b2); b1 = new HistogramBin(1.1, 2.2, false, false); assertFalse(b1.equals(b2)); b2 = new HistogramBin(1.1, 2.2, false, false); assertEquals(b1, b2); b1.setItemCount(99); assertFalse(b1.equals(b2)); b2.setItemCount(99); assertEquals(b1, b2); }