String ip = NetUtils.getIp6FromRange("1234:5678::1-1234:5678::2");
assertThat(ip, anyOf(equalTo("1234:5678::1"), equalTo("1234:5678::2")));
s_logger.info("IP is " + ip);
}
String ipString = null;
IPv6Address ipStart = IPv6Address.fromString("1234:5678::1");
IPv6Address ipEnd = IPv6Address.fromString("1234:5678::ffff:ffff:ffff:ffff");
for (int i = 0; i < 10; i++) {
ipString = NetUtils.getIp6FromRange(ipStart.toString() + "-" + ipEnd.toString());
s_logger.info("IP is " + ipString);
IPv6Address ip = IPv6Address.fromString(ipString);
assertThat(ip, greaterThanOrEqualTo(ipStart));
assertThat(ip, lessThanOrEqualTo(ipEnd));
}
}