tm1.put(new Key("r1", "cf1", "cq1", Long.MAX_VALUE), new Value("v1".getBytes()));
tm1.put(new Key("r1", "cf1", "cq1", 90l), new Value("v2".getBytes()));
tm1.put(new Key("r1", "cf1", "cq1", 0l), new Value("v3".getBytes()));
tm1.put(new Key("r2", "cf1", "cq1", 6l), new Value("v4".getBytes()));
TimeSettingIterator tsi = new TimeSettingIterator(new SortedMapIterator(tm1), 50);
tsi.seek(new Range(new Key("r1", "cf1", "cq1", 50l), true, new Key("r1", "cf1", "cq1", 50l), true), new HashSet<ByteSequence>(), false);
assertTrue(tsi.hasTop());
assertEquals(new Key("r1", "cf1", "cq1", 50l), tsi.getTopKey());
assertEquals("v1", tsi.getTopValue().toString());
tsi.next();
assertTrue(tsi.hasTop());
assertEquals(new Key("r1", "cf1", "cq1", 50l), tsi.getTopKey());
assertEquals("v2", tsi.getTopValue().toString());
tsi.next();
assertTrue(tsi.hasTop());
assertEquals(new Key("r1", "cf1", "cq1", 50l), tsi.getTopKey());
assertEquals("v3", tsi.getTopValue().toString());
tsi.next();
assertFalse(tsi.hasTop());
tsi.seek(new Range(new Key("r1", "cf1", "cq1", 50l), false, null, true), new HashSet<ByteSequence>(), false);
assertTrue(tsi.hasTop());
assertEquals(new Key("r2", "cf1", "cq1", 50l), tsi.getTopKey());
assertEquals("v4", tsi.getTopValue().toString());
tsi.next();
assertFalse(tsi.hasTop());
tsi.seek(new Range(null, true, new Key("r1", "cf1", "cq1", 50l), false), new HashSet<ByteSequence>(), false);
assertTrue(tsi.hasTop());
assertEquals(new Key("r0", "cf1", "cq1", 50l), tsi.getTopKey());
assertEquals("v0", tsi.getTopValue().toString());
tsi.next();
assertFalse(tsi.hasTop());
tsi.seek(new Range(new Key("r1", "cf1", "cq1", 51l), true, new Key("r1", "cf1", "cq1", 50l), false), new HashSet<ByteSequence>(), false);
assertFalse(tsi.hasTop());
}