### Question:
IPv4Ranges { public boolean contains(long ipLong) { boolean out; out = false; for (IPv4Range ipv4Range : this.ranges) { if (ipv4Range.contains(ipLong)) { out = true; return out; } } return out; } IPv4Ranges(); boolean add(String ipBlock); boolean add(String lo, String hi); boolean add(IPv4Range range); Set<IPv4Range> getRanges(); @Override String toString(); boolean contains(long ipLong); boolean contains(String ipStr);  }### Answer:
@Test public void shouldExcept192Ranges() throws IPStringException { ranges = getPrivateRanges(); assertTrue(ranges.contains("192.168.0.12")); assertTrue(ranges.contains("192.168.1.1")); assertTrue(ranges.contains("192.168.2.32")); assertTrue(ranges.contains("192.168.3.44")); assertTrue(ranges.contains("192.168.4.41")); }
@Test public void shouldExcept172Ranges() throws IPStringException { ranges = getPrivateRanges(); assertTrue(ranges.contains("172.16.0.1")); assertTrue(ranges.contains("172.17.0.1")); assertTrue(ranges.contains("172.31.255.255")); }
@Test public void shouldExcept10Ranges() throws IPStringException { ranges = getPrivateRanges(); assertTrue(ranges.contains("10.0.0.1")); assertTrue(ranges.contains("10.250.0.2")); assertTrue(ranges.contains("10.33.0.3")); }