@Test
public void testSeek() {

  // data contains multiple columns and multiple rows
  TestData input = new TestData();
  input.add("0 f q1 WRITE 16", "11");
  input.add("0 f q1 LOCK 21", "1 f q");
  input.add("0 f q1 LOCK 11", "1 f q");
  input.add("0 f q1 DATA 21", "j");
  input.add("0 f q1 DATA 11", "i");
  input.add("0 f q2 WRITE 26", "20");
  input.add("0 f q2 WRITE 18", "9");
  input.add("0 f q2 LOCK 20", "1 f q");
  input.add("0 f q2 LOCK 9", "1 f q");
  input.add("0 f q2 DATA 20", "b");
  input.add("0 f q2 DATA 9", "a");
  input.add("1 f q1 DEL_LOCK 21", "0 ROLLBACK");
  input.add("1 f q1 WRITE 18", "9");
  input.add("1 f q1 LOCK 21", "1 f q");
  input.add("1 f q1 LOCK 9", "1 f q");
  input.add("1 f q1 DATA 21", "y");
  input.add("1 f q1 DATA 9", "x");
  for (Range range : new Range[] {Range.exact("0"), Range.exact("1"), Range.exact("0", "f"),
      Range.exact("0", "f", "q1"), Range.exact("0", "f", "q2"), Range.exact("1", "f", "q1")}) {
    TestData output = new TestData(newSI(input, 6), range);
    Assert.assertEquals(0, output.data.size());
    output = new TestData(newSI(input, 17), range);
    TestData expected = new TestData();
    expected.addIfInRange("0 f q1 DATA 11", "i", range);
    Assert.assertEquals(expected, output);
    output = new TestData(newSI(input, 19), range);
    expected = new TestData();
    expected.addIfInRange("0 f q1 DATA 11", "i", range);
    expected.addIfInRange("0 f q2 DATA 9", "a", range);
    expected.addIfInRange("1 f q1 DATA 9", "x", range);
    Assert.assertEquals(expected, output);
    output = new TestData(newSI(input, 22), range);
    expected = new TestData();
    expected.addIfInRange("0 f q1 LOCK 21", "1 f q", range);
    expected.addIfInRange("0 f q2 DATA 9", "a", range);
    expected.addIfInRange("1 f q1 DATA 9", "x", range);
    Assert.assertEquals(expected, output);
    output = new TestData(newSI(input, 27), range);
    expected = new TestData();
    expected.addIfInRange("0 f q1 LOCK 21", "1 f q", range);
    expected.addIfInRange("0 f q2 DATA 20", "b", range);
    expected.addIfInRange("1 f q1 DATA 9", "x", range);
    Assert.assertEquals(expected, output);
  }
}