@Test
public void logs_uncaught_exceptions() {

    failureHandler.uncaughtException("the actor", "the message", new DummyException());
    String output = this.output.toString();
    assertThat(output, containsString("uncaught exception"));
    assertThat(output, containsString("the actor"));
    assertThat(output, containsString("the message"));
    assertThat(output, containsString(DummyException.class.getName()));
    assertThat("should contain the stack trace", output, containsString("at " + getClass().getName()));
}