public void Remove_ShouldRemove() { var distributedCacheMock = new Mock <IDistributedCache>(); distributedCacheMock.Setup(c => c.Remove(It.IsAny <string>())) .Verifiable(); var cache = new DistributedFlow(distributedCacheMock.Object); cache.Remove("Key"); distributedCacheMock.Verify(c => c.Remove(It.IsAny <string>()), Times.Once); }