public void testStoreAndLoadText() throws IOException {
PigContext pigContext = new PigContext(ExecType.LOCAL, new Properties());
log.info("Running Store...");
String initialdata = File.createTempFile("pig-tmp", "").getAbsolutePath();
PigFile store = new PigFile(Util.encodeEscape(initialdata.toString()));
store.store(bag, new PigStorage(), pigContext);
log.info("Done.");
log.info("Running Load...");
PigFile load = new PigFile(Util.encodeEscape(initialdata.toString()));
DataBag loaded = load.load(new PigStorage(), pigContext);
log.info("Done.");
assertTrue(bag.size() == loaded.size());
Iterator<Tuple> it1 = bag.iterator();