cidr1.compareTo(null);
}
@Test
public void testHasNoOverlap() throws UnknownHostException {
InetCidr cidr1 = new InetCidr(InetAddress.getByName("10.11.12.0"), 24);
InetCidr cidr2 = new InetCidr(InetAddress.getByName("10.11.12.0"), 23);
InetCidr cidr3 = new InetCidr(InetAddress.getByName("10.11.12.0"), 25);
// InetCidr cidr4 = new InetCidr(InetAddress.getByName("10.11.11.0"), 24);
InetCidr cidr5 = new InetCidr(InetAddress.getByName("10.11.13.0"), 24);
InetCidr cidr6 = new InetCidr(InetAddress.getByName("11.11.12.0"), 24);
InetCidr cidr7 = new InetCidr(InetAddress.getByName("129.11.12.0"), 24);
List<InetCidr> list = new ArrayList<InetCidr>();
list.add(cidr1);
list.add(cidr5);
list.add(cidr6);
list.add(cidr7);
InetCidr.checkNoOverlap(list);
list.clear();
list.add(cidr1);
list.add(cidr2);
list.add(cidr3);
try {
InetCidr.checkNoOverlap(list);
Assert.fail();
} catch (IllegalStateException e) {
// good
}
list.clear();
list.add(new InetCidr(InetAddress.getByName("10.11.0.0"), 16));
list.add(cidr1);
try {
InetCidr.checkNoOverlap(list);
Assert.fail();
} catch (IllegalStateException e) {