### Question:
IPAddress { public static boolean isPublic(String ip) { Inet4Address address; try { address = (Inet4Address) InetAddress.getByName(ip); } catch (UnknownHostException exception) { return false; } return !address.isSiteLocalAddress() && !address.isAnyLocalAddress() && !address.isLinkLocalAddress() && !address.isLoopbackAddress() && !address.isMulticastAddress(); }  static boolean isPublic(String ip);  }### Answer:
@Test public void isNotPublic1() { String ip = "192.168.0.11"; boolean isPublic = IPAddress.isPublic(ip); assertFalse(isPublic); }
@Test public void isNotPublic2() { String ip = "172.16.0.11"; boolean isPublic = IPAddress.isPublic(ip); assertFalse(isPublic); }
@Test public void isNotPublic3() { String ip = "10.0.0.11"; boolean isPublic = IPAddress.isPublic(ip); assertFalse(isPublic); }