Add beforeShutdown signal to mock object