private void verify(String file, String extension) throws IOException {
Set<DataModelReflection> expected = collect(open(file));
File temp = folder.newFile("temp" + extension);
ExcelSheetSinkFactory factory = new ExcelSheetSinkFactory(temp);
DataModelSink sink = factory.createSink(SIMPLE, new TestContext.Empty());
try {
for (DataModelReflection model : expected) {
sink.put(model);
}
} finally {
sink.close();
}
Set<DataModelReflection> actual = collect(open(temp.toURI().toURL()));
assertThat(actual, is(expected));
}