### Question:
Time implements Comparable<Time> { public void normalize() { while (nsecs < 0) { nsecs += 1000000000; secs -= 1; } while (nsecs >= 1000000000) { nsecs -= 1000000000; secs += 1; } } Time();  Time(int secs, int nsecs);  Time(double secs);  Time(Time t); Time add(Duration d); Time subtract(Duration d); Duration subtract(Time t); static Time fromMillis(long timeInMillis); static Time fromNano(long timeInNs); @Override String toString(); double toSeconds(); long totalNsecs(); boolean isZero(); void normalize(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(Time t); public int secs; public int nsecs; }### Answer:
@Test public void testNormalize() { Time t = new Time(0, 0); t.secs = 1; t.nsecs = 1000000000; t.normalize(); assertEquals(2, t.secs); assertEquals(0, t.nsecs); t.secs = 1; t.nsecs = -1; t.normalize(); assertEquals(0, t.secs); assertEquals(1000000000 - 1, t.nsecs); }