### Question:
Optimizer { static Matcher sequenceWithFalseIsFalse(Matcher matcher) { if (matcher instanceof SeqMatcher) { for (Matcher m : matcher.<SeqMatcher>as().matchers()) { if (m instanceof FalseMatcher) { return FalseMatcher.INSTANCE; } } } return matcher; } private  Optimizer();   }### Answer:
@Test public void sequenceWithFalseIsFalse() { Matcher input = SeqMatcher.create( AnyMatcher.INSTANCE, FalseMatcher.INSTANCE, AnyMatcher.INSTANCE ); Matcher expected = FalseMatcher.INSTANCE; Assertions.assertEquals(expected, Optimizer.sequenceWithFalseIsFalse(input)); }