DNS { public static String[] getIPs(String strInterface) throws UnknownHostException { return getIPs(strInterface, true); }  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 public void testIPsOfUnknownInterface() throws Exception { try { DNS.getIPs("name-of-an-unknown-interface"); fail("Got an IP for a bogus interface"); } catch (UnknownHostException e) { assertEquals("No such interface name-of-an-unknown-interface", e.getMessage()); } }