gzout.write(buf, 0, buf.length);
gzout.finish();
gzout.close();
StringWriter sw = new StringWriter();
XLogStreamer str = new XLogStreamer(xf, sw, getTestCaseDir(), "oozie.log", 1);
str.streamLog(new Date(currTime - 10000), new Date(currTime - 5000));
String[] out = sw.toString().split("\n");
assertEquals(5, out.length);
assertEquals(true, out[0].contains("_L8_"));
assertEquals(true, out[1].contains("_L9_"));
assertEquals(true, out[2].contains("_L1_"));
assertEquals(true, out[3].contains("_L2_"));
assertEquals(true, out[4].contains("_L4_"));
StringWriter sw1 = new StringWriter();
XLogStreamer str1 = new XLogStreamer(xf, sw1, getTestCaseDir(), "oozie.log", 1);
str1.streamLog(null, null);
out = sw1.toString().split("\n");
assertEquals(6, out.length);
assertEquals(true, out[0].contains("_L8_"));
assertEquals(true, out[1].contains("_L9_"));
assertEquals(true, out[2].contains("_L1_"));