What you shall test is Wifi.maybeToggleWifi is called or not because its only thing in the handleEvent. It doesn't care event type.