@Override
    public int generate(final Properties props) {
        int result = loadExistedWorkerId().orElseGet(this::generateNewWorkerId);
        logWarning(result, props);
        return result;
    }
@Test
    void assertGenerateWithoutExistedWorkerId() {
        ClusterPersistRepository repository = mock(ClusterPersistRepository.class);
        doAnswer((Answer<Object>) invocation -> Boolean.TRUE).when(repository).persistExclusiveEphemeral("/reservation/worker_id/0", "foo_id");
        assertThat(new ClusterWorkerIdGenerator(repository, "foo_id").generate(new Properties()), is(0));
    }