state machine test