NameAndCountFieldValuesFilter implements FieldValuesFilter, Serializable { @Override public NameAndCountFieldValuesFilter copy() { final NameAndCountFieldValuesFilter copy = new NameAndCountFieldValuesFilter(); copy.setFirstCharacter(firstCharacter); copy.setMinimalOccurence(minimalOccurence); copy.setName(name); return copy; }  String getName(); void setName(String name); Integer getMinimalOccurence(); void setMinimalOccurence(Integer minimalOccurence); Character getFirstCharacter(); void setFirstCharacter(Character firstCharacter); @Override boolean matches(Count count, IConverter<String> converter); @Override boolean isEmpty(); @Override NameAndCountFieldValuesFilter copy(); static final char ANY_CHARACTER_SYMBOL; static final char NON_ALPHABETICAL_CHARACTER_SYMBOL; }
@Test public void testCopy() { filter.setName("origName"); filter.setMinimalOccurence(999); filter.setFirstCharacter('a'); final NameAndCountFieldValuesFilter copy = filter.copy(); filter.setName("newName"); filter.setMinimalOccurence(null); filter.setFirstCharacter(null); assertEquals("origName", copy.getName()); assertEquals(Integer.valueOf(999), copy.getMinimalOccurence()); assertEquals(Character.valueOf('a'), copy.getFirstCharacter()); }