Added tests for StateMachine.initState