DFA optimization testing