SnapshotIterator implements SortedKeyValueIterator<Key, Value> { public static void setSnaptime(IteratorSetting cfg, long time) { if (time < 0 || (ColumnConstants.PREFIX_MASK & time) != 0) { throw new IllegalArgumentException(); } cfg.addOption(TIMESTAMP_OPT, time + ""); }  @Override void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options,
      IteratorEnvironment env); @Override boolean hasTop(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); @Override Key getTopKey(); @Override Value getTopValue(); @Override SortedKeyValueIterator<Key, Value> deepCopy(IteratorEnvironment env); static void setSnaptime(IteratorSetting cfg, long time); static void setReturnReadLockPresent(IteratorSetting cfg, boolean rrlp);  }
@Test(expected = IllegalArgumentException.class) public void testNegativeTime() { SnapshotIterator.setSnaptime(null, -3); }
@Test(expected = IllegalArgumentException.class) public void testNonZeroPrefix() { SnapshotIterator.setSnaptime(null, ColumnType.DATA.encode(6)); }