### Question:
DoubleRange implements Comparable<DoubleRange> { @Override public boolean equals(Object o) { if (o instanceof DoubleRange) { DoubleRange other = (DoubleRange) o; return low.equals(other.low) && high.equals(other.high); } return false; } 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 equals_shouldReturnTrueForTheSameObjectTypeAndFalseForDifferentTypeObjects() { Double value1 = 0.0; Double value2 = 5.0; Double value3 = 6.0; DoubleRange obj = new DoubleRange(value1, value2); DoubleRange objTest1 = new DoubleRange(value1, value2); DoubleRange objTest2 = new DoubleRange(value1, value3); Object objTest3 = new Object(); assertTrue(obj.equals(objTest1)); assertFalse(obj.equals(objTest2)); assertFalse(obj.equals(objTest3)); }