### Question:
Optimizer { static Matcher removeStartFollowedByMatchAny(Matcher matcher) { if (matcher instanceof SeqMatcher) { List<Matcher> matchers = matcher.<SeqMatcher>as().matchers(); if (matchers.size() == 2 && matchers.get(0) instanceof StartMatcher && matchers.get(1) instanceof ZeroOrMoreMatcher) { ZeroOrMoreMatcher zm = matchers.get(1).as(); if (zm.repeated() instanceof AnyMatcher) { return zm; } } } return matcher; } private  Optimizer();   }### Answer:
@Test public void removeStartFollowedByMatchAny() { Matcher input = SeqMatcher.create( StartMatcher.INSTANCE, new ZeroOrMoreMatcher(AnyMatcher.INSTANCE, AnyMatcher.INSTANCE) ); Matcher expected = new ZeroOrMoreMatcher(AnyMatcher.INSTANCE, AnyMatcher.INSTANCE); Assertions.assertEquals(expected, Optimizer.removeStartFollowedByMatchAny(input)); }