### Question:
DoubleRange implements Comparable<DoubleRange> { @Override public int hashCode() { return new HashCodeBuilder().append(low).append(high).build(); } DoubleRange();  DoubleRange(Double low, Double high); Double getHigh(); void setHigh(Double high); Double getLow(); void setLow(Double low); @Override int compareTo(DoubleRange other); boolean contains(double d); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void hashCode_shouldReturnTheSameHashCodeForObjectsRepresentingTheSameInterval() { DoubleRange r1 = new DoubleRange(0.0, 1.0); DoubleRange r2 = new DoubleRange(0.0, 1.0); assertEquals(r1.hashCode(), r2.hashCode()); }