@Test
public void shouldReportExceptions() throws Exception {

  final RuntimeException expected = new RuntimeException("expected");
  loggingInit =
      new LoggingInit<>(
          new Init<String, Integer>() {
            @Nonnull
            @Override
            public First<String, Integer> init(String model) {
              throw expected;
            }
          },
          logger);
  try {
    loggingInit.init("log this plx");
  } catch (Exception e) {
    // ignore
  }
  //noinspection unchecked
  assertThat(
      logger.initErrors,
      contains(CapturingLogger.InitErrorArgs.create("log this plx", expected)));
}