output = Output ( rates : rates , errorMessage : errorRelay . We still need a rates observer because we fire only an error when we fetch currency rates. self ) // giving a service with mocked currencies let expectedRates : [ CurrencyRate ] = [ CurrencyRate ( currencyIso : "USD" , rate : 1.4 )] service .