@Test
public void shouldRecoverFromErrorInListener() {

    expectedLogEvents.expectPattern(ConfigObserver.class, Level.ERROR,
            "Failed to notify listener while reloading {}");
    writeConfigLine("example.number=123");
    String[] fooValue = { null };
    observer.onStringValue("example.foo", null,
            v -> fooValue[0] = v
    );
    observer.onStringValue("example.number", "100", s -> { throw new RuntimeException(""); });
    assertThat(fooValue[0]).isNull();
    writeConfigLines("example.number=one", "example.foo=real value");
    assertThat(fooValue[0]).isEqualTo("real value");
}