Fix unittest

Switch to wait on events, not look up stuff in the monitor directly.