Stub state machine