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