PrintStream curOut = System.out;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
System.setOut(new PrintStream(baos, false, Charset.defaultCharset().name()));
try {
PerfRunData runData = createPerfRunData("SystemOut");
CreateIndexTask cit = new CreateIndexTask(runData);
cit.doLogic();
new CloseIndexTask(runData).doLogic();
assertTrue(baos.size() > 0);
} finally {
System.setOut(curOut);
}
PrintStream curErr = System.err;
baos.reset();
System.setErr(new PrintStream(baos, false, Charset.defaultCharset().name()));
try {
PerfRunData runData = createPerfRunData("SystemErr");
CreateIndexTask cit = new CreateIndexTask(runData);
cit.doLogic();
new CloseIndexTask(runData).doLogic();
assertTrue(baos.size() > 0);
} finally {