@Test
public void shouldReadOptionalValue() {

    AtomicReference<Optional<Map<String, String>>> credentials = new AtomicReference<>(Optional.empty());
    writeConfigLines("credentials.username=someuser");
    observer.onPrefixedOptionalValue("credentials", credentials::set);
    assertThat(credentials.get()).get().isEqualTo(Map.of("username", "someuser"));
}