### Question:
RandomAlphabeticStringGenerator implements Generator<String> { @Override public String next() { return RandomStringUtils.randomAlphabetic(length); } RandomAlphabeticStringGenerator(int length); @Override String next();  }### Answer:
@Test public void shouldReturnRandomStringWithoutNumbers() { int length = 50; Generator<String> randomAlphabeticStringGenerator = new RandomAlphabeticStringGenerator(length); Set<String> generatedStrings = newHashSet(); for (int i = 0; i < 100; i++) { String nextString = randomAlphabeticStringGenerator.next(); generatedStrings.add(nextString); assertThat(nextString.length(), is(50)); assertThat(JAVA_LETTER.matchesAllOf(nextString), is(true)); } assertThat(generatedStrings, hasSize(100)); }
@Test public void shouldGenerateBlankString() { assertThat(new RandomAlphabeticStringGenerator(0).next(), is("")); }