put(tm1, "r1", "cf1", "cq3", 5, "v3");
put(tm1, "r1", "cf1", "cq4", 5, "v4");
put(tm1, "r3", "cf1", "cq1", 5, "v5");
put(tm1, "r3", "cf1", "cq2", 5, "v6");
SortedMapIterator smi = new SortedMapIterator(tm1);
TestDataSource tds = new TestDataSource(smi);
SourceSwitchingIterator ssi = new SourceSwitchingIterator(tds, true);
ssi.seek(new Range(), new ArrayList<ByteSequence>(), false);
ane(ssi, "r1", "cf1", "cq1", 5, "v1", true);
TreeMap<Key,Value> tm2 = new TreeMap<Key,Value>(tm1);
put(tm2, "r1", "cf1", "cq5", 5, "v7"); // should not see this because it should not switch until the row is finished
put(tm2, "r2", "cf1", "cq1", 5, "v8"); // should see this new row after it switches
// setup a new data source, but it should not switch until the current row is finished
SortedMapIterator smi2 = new SortedMapIterator(tm2);
TestDataSource tds2 = new TestDataSource(smi2);
tds.next = tds2;
ane(ssi, "r1", "cf1", "cq2", 5, "v2", true);
ane(ssi, "r1", "cf1", "cq3", 5, "v3", true);