### Question:
Millisecond extends RegularTimePeriod implements Serializable, 
        Comparable<TimePeriod> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Millisecond)) { return false; } Millisecond that = (Millisecond) obj; if (this.millisecond != that.millisecond) { return false; } if (this.second != that.second) { return false; } if (this.minute != that.minute) { return false; } if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; } Millisecond();  Millisecond(int millisecond, Second second);  Millisecond(int millisecond, int second, int minute, int hour,
                       int day, int month, int year);  Millisecond(Date time);  Millisecond(Date time, TimeZone zone, Locale locale); Second getSecond(); long getMillisecond(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimePeriod obj); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); static final int FIRST_MILLISECOND_IN_SECOND; static final int LAST_MILLISECOND_IN_SECOND; }### Answer:
@Test public void testEquals() { Day day1 = new Day(29, MonthConstants.MARCH, 2002); Hour hour1 = new Hour(15, day1); Minute minute1 = new Minute(15, hour1); Second second1 = new Second(34, minute1); Millisecond milli1 = new Millisecond(999, second1); Day day2 = new Day(29, MonthConstants.MARCH, 2002); Hour hour2 = new Hour(15, day2); Minute minute2 = new Minute(15, hour2); Second second2 = new Second(34, minute2); Millisecond milli2 = new Millisecond(999, second2); assertEquals(milli1, milli2); }