public async Task HeartsBeating_AllReturnFalse_IfInternalException() { var heartbeat = new ApiHeartbeat( this._exchangeRateApi, this._marketApi, this._ruleApi, this._enrichmentApi, this._logger); A.CallTo(() => this._exchangeRateApi.HeartBeatingAsync(A <CancellationToken> .Ignored)) .Throws <ArgumentNullException>(); A.CallTo(() => this._marketApi.HeartBeatingAsync(A <CancellationToken> .Ignored)).Returns(Task.FromResult(true)); A.CallTo(() => this._ruleApi.HeartBeatingAsync(A <CancellationToken> .Ignored)).Returns(Task.FromResult(true)); var result = await heartbeat.HeartsBeating(); Assert.AreEqual(result, false); }