private OutputStream buf = new ByteArrayOutputStream();
private PrintStream out = new PrintStream(buf, true);
public void testEachPassedTestPrintsDotEorFFailuresOnClose() throws Exception {
DefaultListener printer = new DefaultListener(out, false);
BrowserInfo browser = new BrowserInfo();
browser.setName("TB");
browser.setVersion("1");
browser.setOs("os");
printer.onTestComplete(testResult(browser, "passed", "", "", "A", "d", 1));
printer.onTestComplete(testResult(browser, "failed", gson.toJson(new JsException("name", "abc",
"fileName", 1L, "stack")), "", "B", "e", 2));
printer.onTestComplete(testResult(browser, "error", gson.toJson(new JsException("name", "abc",
"fileName", 1L, "stack")), "", "C", "f", 3));