### Question:
Hosts { public static String getLocalIp() throws UnknownHostException { String preffered = System.getProperty(PREFERED_ADDRESS_PROPERTY_NAME); return chooseAddress(preffered).getHostAddress(); } private  Hosts(); static Map<String, Set<InetAddress>> getNetworkInterfaceAddresses(boolean includeLoopback); static Set<InetAddress> getAddresses(); static String getLocalHostName(); static String getLocalIp(); static final String PREFERED_ADDRESS_PROPERTY_NAME; }### Answer:
@Test public void getLocalIp() throws Exception { assertNotNull(Hosts.getLocalIp()); }