record.put("aUnion", "this is a string");
ResultPair result = unionTester(s, record);
assertTrue(result.value instanceof String);
assertEquals("this is a string", result.value);
UnionObjectInspector uoi = (UnionObjectInspector)result.oi;
assertEquals(1, uoi.getTag(result.unionObject));
// Now the other enum possibility
record = new GenericData.Record(s);
record.put("aUnion", 99);
result = unionTester(s, record);
assertTrue(result.value instanceof Integer);
assertEquals(99, result.value);
uoi = (UnionObjectInspector)result.oi;
assertEquals(0, uoi.getTag(result.unionObject));
}