test that open and close are idempotent
idempotent open and close, and emit _state as events
document state events