### Question:
StringGenerator implements Generator<String> { public char[] getCharSet() { return Arrays.copyOf(charSet, charSet.length); } StringGenerator(Integer length);   StringGenerator(Integer length, CharacterFilter filter); @SafeVarargs  StringGenerator(Integer length, Range<Integer>... range);   StringGenerator(Integer length, CharacterSetRange... range);   StringGenerator(Integer length, CharacterSetGenerator characterSetGenerator);   StringGenerator(Integer length, char[] charset);   StringGenerator(Range<Integer> range);   StringGenerator(Range<Integer> range, CharacterFilter filter);   StringGenerator(Range<Integer> stringRange, CharacterSetRange... charsetRange); @SafeVarargs  StringGenerator(Range<Integer> stringRange, Range<Integer>... charsetRange);   StringGenerator(Range<Integer> range, CharacterSetGenerator characterSetGenerator);   StringGenerator(Integer length, String charset);   StringGenerator(Range<Integer> range, String charset);   StringGenerator(Range<Integer> range, char[] charset); @Override String next(); char[] getCharSet();  }### Answer:
@Test public void cannotChangeCharset() { StringGenerator generator = new StringGenerator(SIZE_OF_RANDOM_STRING); char[] chars = generator.getCharSet(); chars[0] = chars[chars.length - 1]; assertThat(chars).isNotEqualTo(generator.getCharSet()); }