Platform { @Nullable public String linkLocalIp() { if (linkLocalIp != null) return linkLocalIp; synchronized (this) { if (linkLocalIp == null) { linkLocalIp = produceLinkLocalIp(); } } return linkLocalIp; }  @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 linkLocalIp_sameInstance() { assertThat(platform.linkLocalIp()) .isSameAs(platform.linkLocalIp()); }