### Question:
NumberTickUnit extends TickUnit implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof NumberTickUnit)) { return false; } if (!super.equals(obj)) { return false; } NumberTickUnit that = (NumberTickUnit) obj; if (!this.formatter.equals(that.formatter)) { return false; } return true; } NumberTickUnit(double size);  NumberTickUnit(double size, NumberFormat formatter);  NumberTickUnit(double size, NumberFormat formatter,
            int minorTickCount); @Override String valueToString(double value); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode();  }### Answer:
@Test public void testEquals() { NumberTickUnit t1 = new NumberTickUnit(1.23, new DecimalFormat("0.00")); NumberTickUnit t2 = new NumberTickUnit(1.23, new DecimalFormat("0.00")); assertEquals(t1, t2); assertEquals(t2, t1); t1 = new NumberTickUnit(3.21, new DecimalFormat("0.00")); assertFalse(t1.equals(t2)); t2 = new NumberTickUnit(3.21, new DecimalFormat("0.00")); assertEquals(t1, t2); t1 = new NumberTickUnit(3.21, new DecimalFormat("0.000")); assertFalse(t1.equals(t2)); t2 = new NumberTickUnit(3.21, new DecimalFormat("0.000")); assertEquals(t1, t2); }