Add a call to unregister in tests