public void TestGetStateByRange()
        {
            ChaincodeStub stub     = new ChaincodeStub("myc", "txId", handler.Object, new List <ByteString>(), null);
            string        startKey = "START";
            string        endKey   = "END";

            KV[]          keyValues = PrepareKeyValuePairs(2);
            QueryResponse value     = PrepareQueryResponseForRange(keyValues, false);

            handler.Setup((a) => a.GetStateByRangeAsync("myc", "txId", "", startKey, endKey, null, token)).ReturnsAsync(value);
            Assert.That.Contains(stub.GetStateByRange(startKey, endKey), keyValues.Select(a => new KeyValue(a)));
        }