### Question:
Optimizer { static Matcher zeroOrMoreFalse(Matcher matcher) { if (matcher instanceof ZeroOrMoreMatcher) { ZeroOrMoreMatcher zm = matcher.as(); if (zm.repeated() instanceof FalseMatcher || zm.next() instanceof FalseMatcher) { return zm.next(); } } return matcher; } private  Optimizer();   }### Answer:
@Test public void zeroOrMoreFalse_Repeated() { Matcher input = new ZeroOrMoreMatcher(FalseMatcher.INSTANCE, AnyMatcher.INSTANCE); Matcher expected = AnyMatcher.INSTANCE; Assertions.assertEquals(expected, Optimizer.zeroOrMoreFalse(input)); }
@Test public void zeroOrMoreFalse_Next() { Matcher input = new ZeroOrMoreMatcher(AnyMatcher.INSTANCE, FalseMatcher.INSTANCE); Matcher expected = FalseMatcher.INSTANCE; Assertions.assertEquals(expected, Optimizer.zeroOrMoreFalse(input)); }