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];
  }
@Test
  public void testNullDnsServer() throws Exception {
    String host = DNS.getDefaultHost(getLoopbackInterface(), null);
    Assertions.assertThat(host)
        .isEqualTo(DNS.getDefaultHost(getLoopbackInterface()));
  }