Platform { public Clock clock() { return new Clock() { @Override public long currentTimeMicroseconds() { return System.currentTimeMillis() * 1000; } @Override public String toString() { return "System.currentTimeMillis()"; } }; }  @Nullable abstract String getHostString(InetSocketAddress socket); @Nullable String linkLocalIp(); AssertionError assertionError(String message, Throwable cause); static Platform get(); void log(String msg, @Nullable Throwable thrown); void log(String msg, Object param1, @Nullable Throwable thrown); abstract long randomLong(); abstract long nextTraceIdHigh(); Clock clock();  }
@Test public void clock_hasNiceToString_jre7() { assertThat(platform.clock()) .hasToString("System.currentTimeMillis()"); }
@Test public void clock_hasNiceToString_jre9() { Platform platform = new Platform.Jre9(); assertThat(platform.clock()) .hasToString("Clock.systemUTC().instant()"); }