added integration tests for the stateMachine