Add an interaction machine test to make sure state lifecycle events are emitted sensibly