### Question:
DefaultPlatform implements Platform { public @Override long currentTimeMillis() { final long currentTime = System.currentTimeMillis(); long unique = lastTick.updateAndGet(lastReturnedTime -> { if (lastReturnedTime == currentTime) { return currentTime + 1; } if (lastReturnedTime > currentTime) { return lastReturnedTime + 1; } return currentTime; }); return unique; }  @Override File pwd(); @Override void setWorkingDir(File workingDir); @Override String whoami(); @Override long currentTimeMillis(); @Override File getUserHome(); @Override int timeZoneOffset(long timeStamp); @Override long nanoTime(); @Override int availableProcessors();  }### Answer:
@Test public void testClock() throws IOException { DefaultPlatform p1 = new DefaultPlatform(); DefaultPlatform p2 = new DefaultPlatform(); long lastTime = 0; for (int t = 0; t < 1000; t++) { long time1 = p1.currentTimeMillis(); long time2 = p2.currentTimeMillis(); assertNotEquals(time1, lastTime); assertNotEquals(time1, time2); lastTime = time2; } }