State Machine tests