Added test and method to transition out of the state machine