nkv(tm1, 4, 0, false, "2");
nkv(tm1, 6, 0, false, "3");
List<SortedKeyValueIterator<Key,Value>> skvil = new ArrayList<SortedKeyValueIterator<Key,Value>>(1);
skvil.add(new SortedMapIterator(tm1));
MultiIterator mi = new MultiIterator(skvil, true);
mi.seek(new Range(null, true, nk(5, 9), false), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(3, 0)));
assertTrue(mi.getTopValue().toString().equals("1"));
mi.next();
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(4, 0)));
assertTrue(mi.getTopValue().toString().equals("2"));
mi.next();
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 10), true, nk(5, 9), false), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(4, 0)));
assertTrue(mi.getTopValue().toString().equals("2"));
mi.next();
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 10), true, nk(6, 0), false), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(4, 0)));
assertTrue(mi.getTopValue().toString().equals("2"));
mi.next();
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 10), true, nk(6, 0), true), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(4, 0)));
assertTrue(mi.getTopValue().toString().equals("2"));
mi.next();
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(6, 0)));
assertTrue(mi.getTopValue().toString().equals("3"));
mi.next();
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 0), true, nk(6, 0), false), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(4, 0)));
assertTrue(mi.getTopValue().toString().equals("2"));
mi.next();
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 0), false, nk(6, 0), false), EMPTY_COL_FAMS, false);
assertFalse(mi.hasTop());
mi.seek(new Range(nk(4, 0), false, nk(6, 0), true), EMPTY_COL_FAMS, false);
assertTrue(mi.hasTop());
assertTrue(mi.getTopKey().equals(nk(6, 0)));
assertTrue(mi.getTopValue().toString().equals("3"));
mi.next();
assertFalse(mi.hasTop());
}