public async Task RetrieveAsync_ReturnsAValidMessage() { // Arrange cache.Setup(c => c.GetStringAsync(key)).ReturnsAsync(message); cache.Setup(c => c.RemoveAsync(key)).Returns(Task.FromResult(false)); // Act var result = await repository.RetrieveAsync(key); // Assert Assert.AreEqual(message, result); cache.VerifyAll(); }