@@ -0,0 +1,1087 @@
+package hudson.node_monitors;%0A%0Aimport org.jvnet.hudson.test.HudsonTestCase;%0Aimport hudson.slaves.DumbSlave;%0Aimport hudson.slaves.SlaveComputer;%0Aimport hudson.util.ClockDifference;%0Aimport hudson.util.TimeUnit2;%0A%0A/**%0A * @author Richard Mortimer%0A */%0Apublic class ClockMonitorDescriptorTest extends HudsonTestCase %7B%0A    /**%0A     * Makes sure that it returns sensible values.%0A     */%0A    public void testClockMonitor() throws Exception %7B%0A        DumbSlave s = createSlave();%0A        SlaveComputer c = s.getComputer();%0A        c.connect(false).get(); // wait until it's connected%0A        if(c.isOffline())%0A            fail(%22Slave failed to go online: %22+c.getLog());%0A%0A        ClockDifference cd = ClockMonitor.DESCRIPTOR.monitor(c);%0A        long diff = cd.diff;%0A        assertTrue(diff %3C TimeUnit2.SECONDS.toMillis(5));%0A        assertTrue(diff %3E TimeUnit2.SECONDS.toMillis(-5));%0A        assertTrue(cd.abs() %3E= 0);%0A        assertTrue(cd.abs() %3C TimeUnit2.SECONDS.toMillis(5));%0A        assertFalse(cd.isDangerous());%0A        assertTrue(%22html output too short%22, cd.toHtml().length() %3E 0);%0A    %7D%0A%7D%0A

Add basic ClockMonitorDescriptor test