/** Test scanning for keys with begin and end. */ public void testScanKeysBeginEnd() throws StorageException { store.put(new byte[] {1}, new byte[] {1}); store.put(new byte[] {2}, new byte[] {2}); store.put(new byte[] {3}, new byte[] {3}); store.put(new byte[] {4}, new byte[] {1}); store.scanKeys(new byte[] {2}, new byte[] {4}, callback); assertEquals(2, callback.keys.size()); }
/** Test scanning for keys with prefix. */ public void testScanKeysPrefix() throws StorageException { store.put(new byte[] {1}, new byte[] {1}); store.scanKeys(new byte[] {1}, callback); assertEquals(1, callback.keys.size()); }