byte[] file =
run(Arrays.asList(new String[]
{ "-", "--count", COUNT, "--schema-file", SCHEMA_FILE.toString() }));
DataFileStream<Object> reader =
new DataFileStream(new ByteArrayInputStream(file),
new GenericDatumReader<Object>());
Iterator<Object> found = reader.iterator();
for (Object expected :
new RandomData(Schema.parse(SCHEMA_FILE), Integer.parseInt(COUNT)))
assertEquals(expected, found.next());
reader.close();
}