refactor: no import * in tests
optimize imports
fix: replace mutable argument (a list) in StateMachine constructor