LocalUtil { public static String getLocalHostName() throws UnknownHostException { return InetAddress.getLocalHost().getHostName(); }  static String getLocalIP(); static String getLocalHostName();  }
@Test public void testGetLocalHostName() { try { assertEquals(InetAddress.getLocalHost().getHostName(), LocalUtil.getLocalHostName()); } catch (UnknownHostException e) { fail(); } }