@Test
public void testCacheSingleSegment() throws Exception {

  storeEdits(1, 20);
  // Leading part of the segment
  assertTxnCountAndContents(1, 5, 5);
  // All of the segment
  assertTxnCountAndContents(1, 20, 20);
  // Past the segment
  assertTxnCountAndContents(1, 40, 20);
  // Trailing part of the segment
  assertTxnCountAndContents(10, 11, 20);
  // Trailing part of the segment, past the end
  assertTxnCountAndContents(10, 20, 20);
}