I think you want to test also calling `spy.yield()` without changing the state first, and testing the callback is not called.

Therefore, you can use a sinon's stub as callback, and assert whether it's called.

Something like this:
```javascript
var listenerSpy = this.sinon.spy(conn, 'addEventListener');
var stub = sinon.stub();
ThreadUI.simSwitchHandler(stub);
listenerSpy.yield();
conn.data.state = 'registered';
listenerSpy.yield();
sinon.assert.calledOnce(stub);
```