### Question:
InternalErrorReportingFailureHandler extends InternalErrorReporter implements FailureHandler { @Override public void uncaughtException(Object actor, Object message, Throwable exception) { reportInternalError("Uncaught exception in thread " + Thread.currentThread().getName() + " from " + actor + " when processing " + message, exception); } InternalErrorReportingFailureHandler(SuiteListener listener, PrintStream out); @Override void uncaughtException(Object actor, Object message, Throwable exception);  }### Answer:
@Test public void reports_internal_errors() { failureHandler.uncaughtException("the-actor", "the-message", new Throwable("the-exception-message")); String expected = String.format("Uncaught exception in thread %s from the-actor when processing the-message", Thread.currentThread().getName()); verify(suiteListener).onInternalError(eq(expected), notNull(StackTrace.class)); }
@Test public void prints_internal_errors_to_standard_output() { failureHandler.uncaughtException("the-actor", "the-message", new Throwable("the-exception-message")); String output = standardOutput.toString(); assertThat(output, containsString("Uncaught exception in thread")); assertThat(output, containsString("java.lang.Throwable: the-exception-message")); }