return struct;
}
};
// Test control case (cases match)
StructField field = STRUCT_OI.getStructFieldRef(FIELD_0);
Assert.assertEquals("a",
((StringObjectInspector) field.getFieldObjectInspector()).getPrimitiveJavaObject(
STRUCT_OI.getStructFieldData(struct, field)));
// Test upper case
field = STRUCT_OI.getStructFieldRef(FIELD_0.toUpperCase());
Assert.assertEquals("a",
((StringObjectInspector) field.getFieldObjectInspector()).getPrimitiveJavaObject(
STRUCT_OI.getStructFieldData(struct, field)));
// Test lower case (even if someone changes the value of FIELD_0 in the future either upper
// or lower case should be different from the actual case)
field = STRUCT_OI.getStructFieldRef(FIELD_0.toLowerCase());
Assert.assertEquals("a",
((StringObjectInspector) field.getFieldObjectInspector()).getPrimitiveJavaObject(
STRUCT_OI.getStructFieldData(struct, field)));
}