### Question:
WordBreakCompoundRewriterFactory extends RewriterFactory { TrieMap<Boolean> getReverseCompoundTriggerWords() { return reverseCompoundTriggerWords; } WordBreakCompoundRewriterFactory(final String rewriterId,
                                            final Supplier<IndexReader> indexReaderSupplier,
                                            final Morphology morphology,
                                            final String dictionaryField,
                                            final boolean lowerCaseInput,
                                            final int minSuggestionFreq,
                                            final int maxCombineLength,
                                            final int minBreakLength,
                                            final List<String> reverseCompoundTriggerWords,
                                            final boolean alwaysAddReverseCompounds,
                                            final int maxDecompoundExpansions,
                                            final boolean verifyDecompoundCollation); @Override QueryRewriter createRewriter(final ExpandedQuery input,
                                        final SearchEngineRequestAdapter searchEngineRequestAdapter); @Override Set<Term> getGenerableTerms();  }### Answer:
@Test public void testThatTriggerWordsAreTurnedToLowerCaseForFlagLowerCaseInputTrue() { final WordBreakCompoundRewriterFactory factory = new WordBreakCompoundRewriterFactory("w1", () -> null, Morphology.DEFAULT, "field1", true, 1, 2, 1, Arrays.asList("Word1", "word2"), false, 2, false); final TrieMap<Boolean> triggerWords = factory.getReverseCompoundTriggerWords(); assertTrue(triggerWords.get("word1").getStateForCompleteSequence().isFinal()); assertTrue(triggerWords.get("word2").getStateForCompleteSequence().isFinal()); }
@Test public void testThatTriggerWordsAreTurnedToLowerCaseForFlagLowerCaseInputFalse() { final WordBreakCompoundRewriterFactory factory = new WordBreakCompoundRewriterFactory("w2", () -> null, Morphology.GERMAN, "field1", false, 1, 2, 1, Arrays.asList("Word1", "word2"), false, 2, false); final TrieMap<Boolean> triggerWords = factory.getReverseCompoundTriggerWords(); Assert.assertFalse(triggerWords.get("word1").getStateForCompleteSequence().isFinal()); assertTrue(triggerWords.get("Word1").getStateForCompleteSequence().isFinal()); assertTrue(triggerWords.get("word2").getStateForCompleteSequence().isFinal()); }