VARCHAR.writeString(expectedBlockBuilder, "dave");
Block expectedBlock = expectedBlockBuilder.build();
Page expectedPage = new Page(expectedBlock, expectedBlock, expectedBlock);
DynamicSliceOutput sliceOutput = new DynamicSliceOutput(1024);
writePages(createTestingBlockEncodingManager(), sliceOutput, expectedPage, expectedPage, expectedPage);
List<Type> types = ImmutableList.<Type>of(VARCHAR, VARCHAR, VARCHAR);
Iterator<Page> pageIterator = readPages(createTestingBlockEncodingManager(), sliceOutput.slice().getInput());
assertPageEquals(types, pageIterator.next(), expectedPage);
assertPageEquals(types, pageIterator.next(), expectedPage);
assertPageEquals(types, pageIterator.next(), expectedPage);
assertFalse(pageIterator.hasNext());
}