@Override
    public int generate(final Properties props) {
        if (!props.containsKey(WORKER_ID_KEY)) {
            return DEFAULT_WORKER_ID;
        }
        int result = Integer.parseInt(props.get(WORKER_ID_KEY).toString());
        ShardingSpherePreconditions.checkState(result >= 0 && result <= MAX_WORKER_ID, WorkerIdAssignedException::new);
        return result;
    }
@Test
    void assertGenerateWithProperties() {
        assertThat(new StandaloneWorkerIdGenerator().generate(PropertiesBuilder.build(new Property(WorkerIdGenerator.WORKER_ID_KEY, "1"))), is(1));
    }