### Question:
RotationTimerFactory { public RotationTimer createTimer() { long startTimeNanos = clock.nanos(); long timeoutNanos = TimeUnit.MILLISECONDS.toNanos( timeoutMillis ); return new RotationTimer( startTimeNanos, startTimeNanos + timeoutNanos ); } RotationTimerFactory( SystemNanoClock clock, long timeoutMillis ); RotationTimer createTimer();  }### Answer:
@Test public void testTimer() { FakeClock fakeClock = Clocks.fakeClock( 10000 , TimeUnit.MILLISECONDS ); RotationTimerFactory timerFactory = new RotationTimerFactory( fakeClock, 1000 ); RotationTimerFactory.RotationTimer timer = timerFactory.createTimer(); RotationTimerFactory.RotationTimer anotherTimer = timerFactory.createTimer(); assertFalse( timer.isTimedOut() ); assertEquals( 0, timer.getElapsedTimeMillis() ); assertNotSame( "Factory should construct different timers", timer, anotherTimer ); fakeClock = Clocks.fakeClock(); RotationTimerFactory fakeTimerFactory = new RotationTimerFactory( fakeClock, 1000 ); RotationTimerFactory.RotationTimer fakeTimer = fakeTimerFactory.createTimer(); fakeClock.forward( 1001, TimeUnit.MILLISECONDS ); assertTrue( fakeTimer.isTimedOut() ); assertEquals( 1001, fakeTimer.getElapsedTimeMillis() ); }