### Question:
MarkerAxisBand implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MarkerAxisBand)) { return false; } MarkerAxisBand that = (MarkerAxisBand) obj; if (this.topOuterGap != that.topOuterGap) { return false; } if (this.topInnerGap != that.topInnerGap) { return false; } if (this.bottomInnerGap != that.bottomInnerGap) { return false; } if (this.bottomOuterGap != that.bottomOuterGap) { return false; } if (!ObjectUtils.equal(this.font, that.font)) { return false; } if (!ObjectUtils.equal(this.markers, that.markers)) { return false; } return true; } MarkerAxisBand(NumberAxis axis,
                          double topOuterGap, double topInnerGap,
                          double bottomOuterGap, double bottomInnerGap,
                          Font font); void addMarker(IntervalMarker marker); double getHeight(Graphics2D g2); void draw(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea,
                     double x, double y); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testEquals() { Font font1 = new Font("SansSerif", Font.PLAIN, 12); Font font2 = new Font("SansSerif", Font.PLAIN, 14); MarkerAxisBand a1 = new MarkerAxisBand(null, 1.0, 1.0, 1.0, 1.0, font1); MarkerAxisBand a2 = new MarkerAxisBand(null, 1.0, 1.0, 1.0, 1.0, font1); assertEquals(a1, a2); a1 = new MarkerAxisBand(null, 2.0, 1.0, 1.0, 1.0, font1); assertFalse(a1.equals(a2)); a2 = new MarkerAxisBand(null, 2.0, 1.0, 1.0, 1.0, font1); assertEquals(a1, a2); a1 = new MarkerAxisBand(null, 2.0, 3.0, 1.0, 1.0, font1); assertFalse(a1.equals(a2)); a2 = new MarkerAxisBand(null, 2.0, 3.0, 1.0, 1.0, font1); assertEquals(a1, a2); a1 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 1.0, font1); assertFalse(a1.equals(a2)); a2 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 1.0, font1); assertEquals(a1, a2); a1 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 5.0, font1); assertFalse(a1.equals(a2)); a2 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 5.0, font1); assertEquals(a1, a2); a1 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 5.0, font2); assertFalse(a1.equals(a2)); a2 = new MarkerAxisBand(null, 2.0, 3.0, 4.0, 5.0, font2); assertEquals(a1, a2); }