added tests for automaton code