Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, tmpDir.getDefaultConfiguration());
PCollection<Person> genericCollection = pipeline.read(At.avroFile(avroFile.getAbsolutePath(),
Avros.records(Person.class)));
File outputFile = tmpDir.getFile("output");
Target textFile = To.textFile(outputFile.getAbsolutePath());
pipeline.write(genericCollection, textFile);
pipeline.run();
Person person = genericCollection.materialize().iterator().next();
String outputString = FileUtils.readFileToString(new File(outputFile, "part-m-00000"));
assertTrue(outputString.contains(person.toString()));