State machine tests added, passing.