pigIStream = new BufferedReader(new FileReader(basedir + "/input1.pig"));
pigOStream = new FileWriter(basedir + "/output1.pig");
String[] arg = {"date='092487'","date='20080228'"};
String[] argFiles = null;
ps.genSubstitutedFile(pigIStream , pigOStream , arg , argFiles);
FileInputStream pigResultStream = new FileInputStream(basedir + "/output1.pig");
pigExResultStream = new FileInputStream(basedir + "/ExpectedResult.pig");
BufferedReader inExpected = new BufferedReader(new InputStreamReader(pigExResultStream));
BufferedReader inResult = new BufferedReader(new InputStreamReader(pigResultStream));