Fix tests for serviceDiscovery and serviceUnavailable middleware.