public int generateWorkerId(final Properties props) {
        Preconditions.checkArgument(workerIdGenerator.get() != null, "Worker id generator is not initialized.");
        int result = workerIdGenerator.get().generate(props);
        instance.setWorkerId(result);
        return result;
    }
@Test
    void assertGenerateWorkerId() {
        ComputeNodeInstanceContext context = new ComputeNodeInstanceContext(
                new ComputeNodeInstance(mock(InstanceMetaData.class)), mock(WorkerIdGenerator.class), modeConfig, lockContext, eventBusContext);
        assertThat(context.generateWorkerId(new Properties()), is(0));
    }