public void Get() { Mock <IEtcdClient> etcdClientMock = new Mock <IEtcdClient>(); Mock <IDisposable> disposableMock = new Mock <IDisposable>(); EtcdCompoundClient client = new EtcdCompoundClient(etcdClientMock.Object, disposableMock.Object); Fixture fixture = new Fixture(); string key = fixture.Create <string>(); RangeResponse response = fixture.Create <RangeResponse>(); etcdClientMock.Setup(p => p.Get(key, null, null, CancellationToken.None)).Returns(response); RangeResponse actualResponse = client.Get(key); etcdClientMock.Verify(p => p.Get(key, null, null, CancellationToken.None), Times.Once); Assert.AreSame(response, actualResponse); }