public void testSetConversionProperties() throws ExecException {
PhoneNumber pn = new PhoneNumber();
pn.setNumber("1234");
pn.setType(PhoneType.HOME);
ThriftToPig ttp = ThriftToPig.newInstance(PhoneNumber.class);
Tuple tuple = ttp.getPigTuple(pn);
assertEquals(DataType.CHARARRAY, tuple.getType(1));
assertEquals(PhoneType.HOME.toString(), tuple.get(1));
Configuration conf = new Configuration();
conf.setBoolean(ThriftToPig.USE_ENUM_ID_CONF_KEY, true);
ThriftToPig.setConversionProperties(conf);
tuple = ttp.getPigTuple(pn);
assertEquals(DataType.INTEGER, tuple.getType(1));
assertEquals(PhoneType.HOME.getValue(), tuple.get(1));
}