question: public void testCopyCharArraySet ( ) { CharArraySet setIngoreCase = new CharArraySet ( 10 , true ) ; CharArraySet setCaseSensitive = new CharArraySet ( 10 , false ) ; List < String > stopwords = Arrays . asList ( TEST_STOP_WORDS ) ; List < String > stopwordsUpper = new ArrayList < > ( ) ; for ( String string : stopwords ) { stopwordsUpper . add ( string . toUpperCase ( Locale . ROOT ) ) ; } setIngoreCase . addAll ( Arrays . asList ( TEST_STOP_WORDS ) ) ; setIngoreCase . add ( Integer . valueOf ( 1 ) ) ; setCaseSensitive . addAll ( Arrays . asList ( TEST_STOP_WORDS ) ) ; setCaseSensitive . add ( Integer . valueOf ( 1 ) ) ; CharArraySet copy = CharArraySet . copy ( setIngoreCase ) ; CharArraySet copyCaseSens = CharArraySet . copy ( setCaseSensitive ) ; assertEquals ( setIngoreCase . size ( ) , copy . size ( ) ) ; assertEquals ( setCaseSensitive . size ( ) , copy . size ( ) ) ; assertTrue ( copy . containsAll ( stopwords ) ) ; assertTrue ( copy . containsAll ( stopwordsUpper ) ) ; assertTrue ( copyCaseSens . containsAll ( stopwords ) ) ; for ( String string : stopwordsUpper ) { assertFalse ( copyCaseSens . contains ( string ) ) ; } List < String > newWords = new ArrayList < > ( ) ; for ( String string : stopwords ) { newWords . add ( string + "_1" ) ; } copy . addAll ( newWords ) ; assertTrue ( copy . containsAll ( stopwords ) ) ; assertTrue ( copy . containsAll ( stopwordsUpper ) ) ; assertTrue ( copy . containsAll ( newWords ) ) ; for ( String string : newWords ) { assertFalse ( setIngoreCase . contains ( string ) ) ; assertFalse ( setCaseSensitive . contains ( string ) ) ; } }
target:  Test the static #copy() function with a CharArraySet as a source