### Question:
Second extends RegularTimePeriod implements Serializable { @Override public RegularTimePeriod next() { Second result = null; if (this.second != LAST_SECOND_IN_MINUTE) { result = new Second(this.second + 1, getMinute()); } else { Minute next = (Minute) getMinute().next(); if (next != null) { result = new Second(FIRST_SECOND_IN_MINUTE, next); } } return result; } Second();  Second(int second, Minute minute);  Second(int second, int minute, int hour,
                  int day, int month, int year);  Second(Date time);  Second(Date time, TimeZone zone, Locale locale); int getSecond(); Minute getMinute(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimePeriod o1); static Second parseSecond(String s); static final int FIRST_SECOND_IN_MINUTE; static final int LAST_SECOND_IN_MINUTE; }### Answer:
@Test public void testNext() { Second s = new Second(55, 30, 1, 12, 12, 2000); s = (Second) s.next(); assertEquals(2000, s.getMinute().getHour().getYear()); assertEquals(12, s.getMinute().getHour().getMonth()); assertEquals(12, s.getMinute().getHour().getDayOfMonth()); assertEquals(1, s.getMinute().getHour().getHour()); assertEquals(30, s.getMinute().getMinute()); assertEquals(56, s.getSecond()); s = new Second(59, 59, 23, 31, 12, 9999); assertNull(s.next()); }