DNS { public static String getDefaultHost(@Nullable String strInterface, @Nullable String nameserver, boolean tryfallbackResolution) throws UnknownHostException { if (strInterface == null || "default".equals(strInterface)) { return cachedHostname; } if (nameserver != null && "default".equals(nameserver)) { nameserver = null; } String[] hosts = getHosts(strInterface, nameserver, tryfallbackResolution); return hosts[0]; }  static String reverseDns(InetAddress hostIp, @Nullable String ns); static String[] getIPs(String strInterface); static String[] getIPs(String strInterface,
      boolean returnSubinterfaces); static String getDefaultIP(String strInterface); static String[] getHosts(String strInterface,
                                  @Nullable String nameserver,
                                  boolean tryfallbackResolution); static String[] getHosts(String strInterface); static String getDefaultHost(@Nullable String strInterface,
                                      @Nullable String nameserver,
                                      boolean tryfallbackResolution); static String getDefaultHost(@Nullable String strInterface); static String getDefaultHost(@Nullable String strInterface,
                                      @Nullable String nameserver); static List<InetAddress> getIPsAsInetAddressList(String strInterface,
      boolean returnSubinterfaces);  }
@Test (timeout=60000) public void testLookupWithHostsFallback() throws Exception { assumeTrue(!Shell.WINDOWS); final String oldHostname = changeDnsCachedHostname(DUMMY_HOSTNAME); try { String hostname = DNS.getDefaultHost( getLoopbackInterface(), INVALID_DNS_SERVER, true); assertThat(hostname, not(DUMMY_HOSTNAME)); } finally { changeDnsCachedHostname(oldHostname); } }