AvroBagWrapper size5 = null; // [ 1, 2, 3, 4, 5 ]
// 3 arrays in records are in an arbitrary order. We re-order them by
// their size.
for (GenericData.Record record : records) {
AvroTupleWrapper tw = new AvroTupleWrapper<GenericData.Record>(record);
if (((AvroBagWrapper)tw.get(0)).size() == 0) {
size0 = (AvroBagWrapper)tw.get(0);
} else if (((AvroBagWrapper)tw.get(0)).size() == 1) {
size1 = (AvroBagWrapper)tw.get(0);
} else if (((AvroBagWrapper)tw.get(0)).size() == 5) {
size5 = (AvroBagWrapper)tw.get(0);
}
}
assertEquals(0, size0.size());
assertEquals(1, size1.size());