Foundation { public static NetworkProvider net() { try { return getManager().provider(NetworkProvider.class); } catch (Exception ex) { logger.error("Initialize NetworkProvider failed.", ex); return NullProviderManager.provider; } }  static String getProperty(String name, String defaultValue); static NetworkProvider net(); static ServerProvider server(); static ApplicationProvider app();  }
@Test public void testNet() { String hostAddress = Foundation.net().getHostAddress(); String hostName = Foundation.net().getHostName(); Assert.assertNotNull("No host address detected.", hostAddress); Assert.assertNotNull("No host name resolved.", hostName); }