### Question:
SimpleHistogramBin implements Comparable,
        Cloneable, PublicCloneable, Serializable { public void setItemCount(int count) { this.itemCount = count; } SimpleHistogramBin(double lowerBound, double upperBound);  SimpleHistogramBin(double lowerBound, double upperBound,
                              boolean includeLowerBound,
                              boolean includeUpperBound); double getLowerBound(); double getUpperBound(); int getItemCount(); void setItemCount(int count); boolean accepts(double value); boolean overlapsWith(SimpleHistogramBin bin); @Override int compareTo(Object obj); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testSerialization() throws IOException, ClassNotFoundException { SimpleHistogramBin b1 = new SimpleHistogramBin(1.0, 2.0, false, true); b1.setItemCount(123); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(b1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()) ); SimpleHistogramBin b2 = (SimpleHistogramBin) in.readObject(); in.close(); assertEquals(b1, b2); }