class ConfigObserver {

    public ConfigObserver onLongValue(String key, long defaultValue, ConfigValueListener<Long> listener) {
        return onSingleConfigValue(key, Long::parseLong, defaultValue, listener);
    }

}

class ConfigObserverTest {

    @Rule
    public ExpectedLogEventsRule expectedLogEvents;
    private final File directory;
    private final BlockingQueue<Instant> reloadTimes;
    private final ConfigObserver observer;
    private InetSocketAddress httpListenAddress;
    private DummyDataSource dataSource;
    private Duration daemonPollingInterval;

    @Test
    public void shouldReadLongValue() {

        AtomicLong value = new AtomicLong(0);
        observer.onLongValue("test", 11L, value::set);
        assertThat(value.get()).isEqualTo(11L);
        writeConfigLine("test = 1337");
        assertThat(value.get()).isEqualTo(1337L);
    }

}