### Question:
YInterval implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof YInterval)) { return false; } YInterval that = (YInterval) obj; if (this.y != that.y) { return false; } if (this.yLow != that.yLow) { return false; } if (this.yHigh != that.yHigh) { return false; } return true; } YInterval(double y, double yLow, double yHigh); double getY(); double getYLow(); double getYHigh(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals() { YInterval i1 = new YInterval(1.0, 0.5, 1.5); YInterval i2 = new YInterval(1.0, 0.5, 1.5); assertEquals(i1, i2); i1 = new YInterval(1.1, 0.5, 1.5); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.5, 1.5); assertEquals(i1, i2); i1 = new YInterval(1.1, 0.55, 1.5); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.55, 1.5); assertEquals(i1, i2); i1 = new YInterval(1.1, 0.55, 1.55); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.55, 1.55); assertEquals(i1, i2); }