### Question:
DomainGenerator implements Generator<String> { @Override public String next() { String domain = domainGenerator.next(); if (domain.startsWith("-") || domain.endsWith("-")) { return next(); } return domain; } DomainGenerator();  DomainGenerator(Range<Integer> range); @Override String next();  }### Answer:
@Test public void noInvalidCharacters(){ for (int i = 0;i < 10000; i++) { String domain = domainGenerator.next(); print(domain); assertThat(domain.startsWith("-")).isFalse(); assertThat(domain.endsWith("-")).isFalse(); } }