public static void assertOutput(String output, Configuration conf)
throws NumberFormatException, IOException, InterruptedException {
DatumReader datumReader = new SpecificDatumReader(AvroTweetsJoin.getAvroOutputSchema());
FileReader reader = DataFileReader.openReader(new File(output),datumReader);
Record record=null;
record = (Record)reader.next(record);
Assert.assertEquals("eric",record.get("username").toString());
Array<Utf8> hashtags = (Array<Utf8>)record.get("hashtags");
assertEquals(hashtags,"ivan","datasalt","pere");
reader.next(record);
Assert.assertEquals("eric",record.get("username").toString());
assertEquals(hashtags,"ivan2","datasalt2","pere2");
reader.next(record);
Assert.assertEquals("marianico",record.get("username").toString());
assertEquals(hashtags,"ivan2","datasalt2","pere2");
Assert.assertFalse(reader.hasNext());
}