@Test public void shouldReturnAnIPAddressWithValidOctets() { Generator<String> generator = new IPv6Generator(); for (int i = 0; i < 100; i++) { String ipAddress = generator.next(); assertThatHasValidHexDigitsInGroups(ipAddress); } }
@Override public String next() { return format(IP_ADDRESS_FORMAT, generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup()); }
IPv6Generator implements Generator<String> { @Override public String next() { return format(IP_ADDRESS_FORMAT, generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup()); } }
IPv6Generator implements Generator<String> { @Override public String next() { return format(IP_ADDRESS_FORMAT, generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup()); } IPv6Generator();  IPv6Generator(Generator<Integer> delegate); }
IPv6Generator implements Generator<String> { @Override public String next() { return format(IP_ADDRESS_FORMAT, generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup()); } IPv6Generator();  IPv6Generator(Generator<Integer> delegate); @Override String next(); }
IPv6Generator implements Generator<String> { @Override public String next() { return format(IP_ADDRESS_FORMAT, generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup(), generateGroup()); } IPv6Generator();  IPv6Generator(Generator<Integer> delegate); @Override String next();  }