### Question:
CharacterSetGenerator { public char[] getCharset() { return Arrays.copyOf(charset, charset.length); } CharacterSetGenerator(); @SafeVarargs  CharacterSetGenerator(Range<Integer>... ranges);  CharacterSetGenerator(CharacterSetRange... ranges);  CharacterSetGenerator(CharacterFilter filter);  CharacterSetGenerator(CharacterSetFilter filter, CharacterSetRange... characterSetRanges); @SafeVarargs  CharacterSetGenerator(CharacterSetFilter filter, Range<Integer>... ranges);  CharacterSetGenerator(CharacterFilter filter, CharacterSetRange... characterSetRanges); @SafeVarargs  CharacterSetGenerator(CharacterFilter filter, Range<Integer>... ranges); char[] getCharset();  }### Answer:
@Test public void onlyValidCharsInArray() { CharacterSetGenerator generator = new CharacterSetGenerator(filter); assertThat(generator.getCharset()) .hasSize(2) .containsOnly('A', 'B'); }
@Test public void canTakeMultipleRanges() { CharacterSetGenerator generator = new CharacterSetGenerator(CharacterSetRange.values()); assertThat(generator.getCharset()).hasSize(525); print(generator.getCharset()); }