void () { mySimpleTest.setStarted(); mySimpleTest.setTestFailed("msg 1", "stack trace 1", false); assertFalse(mySimpleTest.isInProgress()); assertTrue(mySimpleTest.wasLaunched()); assertTrue(mySimpleTest.isDefect()); assertTrue(mySimpleTest.getMagnitudeInfo() == Magnitude.FAILED_INDEX); final MockPrinter printer = new MockPrinter(); mySimpleTest.printOn(printer); assertEquals("", printer.getStdOut()); assertEquals("\nmsg 1\nstack trace 1\n", printer.getStdErr()); assertEquals("", printer.getStdSys()); mySimpleTest.setTestFailed("msg 2", "stack trace 2", false); assertFalse(mySimpleTest.isInProgress()); assertTrue(mySimpleTest.wasLaunched()); assertTrue(mySimpleTest.isDefect()); assertTrue(mySimpleTest.getMagnitudeInfo() == Magnitude.FAILED_INDEX); printer.resetIfNecessary(); mySimpleTest.printOn(printer); assertEquals("", printer.getStdOut()); assertEquals("\nmsg 1\nstack trace 1\n\nmsg 2\nstack trace 2\n", printer.getStdErr()); assertEquals("", printer.getStdSys()); mySimpleTest.setFinished(); assertFalse(mySimpleTest.isInProgress()); assertTrue(mySimpleTest.wasLaunched()); assertTrue(mySimpleTest.isDefect()); assertTrue(mySimpleTest.getMagnitudeInfo() == Magnitude.FAILED_INDEX); }