@Test
void errorWithACauseIsLogged() throws IOException {

    IllegalStateException error = new IllegalStateException(
            new IllegalArgumentException(
                    new NullPointerException()
            )
    );
    assertTimeoutPreemptively(Duration.ofMillis(500), () ->
            UNDER_TEST.log(L.WARN, error, ErrorContext.builder()
                    .whatToDo("Succeed the test")
                    .related("Test object")
                    .build())
    );
    List<String> lines = getLines(error.getClass().getSimpleName());
    assertTrue(lines.contains("java.lang.IllegalStateException: java.lang.IllegalArgumentException: java.lang.NullPointerException"), () -> "Did not contain 'java.lang.IllegalStateException: java.lang.IllegalArgumentException: java.lang.NullPointerException', " + lines);
    assertTrue(lines.contains("Caused by:"), () -> "Did not contain 'Caused by:', " + lines);
    assertTrue(lines.contains("java.lang.IllegalArgumentException: java.lang.NullPointerException"), () -> "Did not contain 'java.lang.IllegalArgumentException: java.lang.NullPointerException', " + lines);
    assertTrue(lines.contains("java.lang.NullPointerException"), () -> "Did not contain 'caused by: java.lang.NullPointerException', " + lines);
}