### Question:
PostcodeGenerator implements Generator<String> { public String next() { return girobankChanceGenerator.next() ? "GIR 0AA" : outwardCodeOptionsGenerator.next().getGenerator().next() + " " + inwardCode.next(); }  String next();  }### Answer:
@Test public void generatePostcode() { Generator<String> postcodeGenerator = RDG.postcode(); for (int i = 0; i < 10000; i++) { String postcode = postcodeGenerator.next(); print(postcode); assertThat(pattern.matcher(postcode).matches()).isTrue(); } }