### Question:
SakuliExceptionHandler { static boolean containsException(TestSuite testSuite) { if (testSuite.getException() != null) { return true; } if (!CollectionUtils.isEmpty(testSuite.getTestCases())) { for (TestCase tc : testSuite.getTestCases().values()) { if (tc.getException() != null) { return true; } for (TestCaseStep step : tc.getSteps()) { if (step.getException() != null) { return true; } } } } return false; }  static List<Exception> getAllExceptions(TestSuite testSuite); static Path getScreenshotFile(Exception e); static Exception castTo(SakuliException e); void handleException(Exception e); boolean isAlreadyProcessed(Exception e); boolean resumeToTestExecution(Exception e); void handleException(Exception e, boolean resumeOnException); void handleException(String exceptionMessage, boolean resumeOnException); void handleException(String exceptionMessage, RegionImpl lastRegion, boolean resumeOnException); void handleException(Exception e, RegionImpl lastRegion, boolean resumeOnException); void handleException(LogResult logResult);  }### Answer:
@Test public void testContainsExceptionsStep() throws Exception { TestSuite ts = new TestSuite(); TestCase tc = new TestCase(null, null); ts.addTestCase(tc); TestCaseStep step = new TestCaseStep(); step.addException(new SakuliCheckedException("bla3")); tc.addStep(step); assertTrue(SakuliExceptionHandler.containsException(ts)); }
@Test public void testContainsExceptionsCase() throws Exception { TestSuite ts = new TestSuite(); TestCase tc = new TestCase(null, null); tc.addException(new SakuliCheckedException("bla2")); ts.addTestCase(tc); TestCaseStep step = new TestCaseStep(); tc.addStep(step); assertTrue(SakuliExceptionHandler.containsException(ts)); }
@Test public void testContainsExceptionsSuite() throws Exception { TestSuite ts = new TestSuite(); ts.addException(new SakuliCheckedException("bla")); TestCase tc = new TestCase(null, null); ts.addTestCase(tc); TestCaseStep step = new TestCaseStep(); tc.addStep(step); assertTrue(SakuliExceptionHandler.containsException(ts)); }