OfficePhone oPhone = new OfficePhone();
oPhone.setAreaCode(999L);
oPhone.setNumber(1234455555L);
ContactInfo contact = new ContactInfo();
List<Address> addresses = new ArrayList<Address>();
address.setCounty(hPhone); // set value for the union type
addresses.add(address);
addresses.add(address);
contact.setAddress(addresses);
contact.setHomePhone(hPhone);
contact.setOfficePhone(oPhone);
employee.setContactInfo(contact);
DatumWriter<Employee> datumWriter = new SpecificDatumWriter<Employee>(Employee.class);
DataFileWriter<Employee> dataFileWriter = new DataFileWriter<Employee>(datumWriter);