statemachine test