@Test
  public void testGetLocalHostNotLoopbackAddress() throws UnknownHostException {
    mockStatic(InetAddress.class);
    InetAddress inetAddressLocalHost = mock(InetAddress.class);
    when(inetAddressLocalHost.isLoopbackAddress()).thenReturn(false);
    when(InetAddress.getLocalHost()).thenReturn(inetAddressLocalHost);
    assertEquals(inetAddressLocalHost, Util.getLocalHost());
  }
It's difficult to explicitly test having an actual version and using the fallback, due to the usage of methods of
 Class.
samza-core/src/test/java/org/apache/samza/util/TestUtil.java