### Question:
Millisecond extends RegularTimePeriod implements Serializable, 
        Comparable<TimePeriod> { @Override public long getSerialIndex() { long hourIndex = this.day.getSerialIndex() * 24L + this.hour; long minuteIndex = hourIndex * 60L + this.minute; long secondIndex = minuteIndex * 60L + this.second; return secondIndex * 1000L + this.millisecond; } 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 testGetSerialIndex() { Millisecond m = new Millisecond(500, 1, 1, 1, 1, 1, 2000); assertEquals(3155850061500L, m.getSerialIndex()); m = new Millisecond(500, 1, 1, 1, 1, 1, 1900); assertEquals(176461500L, m.getSerialIndex()); }