### Question:
MVCCStoreImpl extends RocksdbKVStore<K, V> implements MVCCStore<K, V> { @Override public synchronized KVIterator<K, V> range(K from, K to) { checkStoreOpen(); RangeResultIterator iter = new RangeResultIterator(from, to); kvIters.add(iter); return iter; } MVCCStoreImpl(); @Override OpFactory<K, V> getOpFactory(); @Override void put(K key, V value); @Override synchronized V putIfAbsent(K key, V value); @Override synchronized KVMulti<K, V> multi(); @Override synchronized V delete(K key); @Override synchronized V get(K key); @Override synchronized KVIterator<K, V> range(K from, K to); @Override IncrementResult<K, V> increment(long revision, IncrementOp<K, V> op); @Override PutResult<K, V> put(long revision, PutOp<K, V> op); @Override DeleteResult<K, V> delete(long revision, DeleteOp<K, V> op); @Override synchronized TxnResult<K, V> txn(long revision, TxnOp<K, V> op); @Override RangeResult<K, V> range(RangeOp<K, V> rangeOp);  }### Answer:
@Test public void testAllRange() throws Exception { store.init(spec); writeKVs(100, 1L); KVIterator<String, String> iter = store.range( getKey(0), getKey(100)); int idx = 0; while (iter.hasNext()) { KV<String, String> kv = iter.next(); assertEquals(getKey(idx), kv.key()); assertEquals(getValue(idx), kv.value()); ++idx; } assertEquals(100, idx); iter.close(); }
@Test public void testSubRange() throws Exception { store.init(spec); writeKVs(100, 1L); KVIterator<String, String> iter = store.range( getKey(20), getKey(79)); int idx = 20; while (iter.hasNext()) { KV<String, String> kv = iter.next(); assertEquals(getKey(idx), kv.key()); assertEquals(getValue(idx), kv.value()); ++idx; } assertEquals(80, idx); iter.close(); }