@Test
public void generateSingleThread() {

    Set<Long> ids = new HashSet<>();
    IdGeneratorService idGeneratorService = new IdGeneratorService();
    for (int i = 0; i < 4096; i++) {
        long id = idGeneratorService.generate(1);
        assertTrue(ids.add(id));
    }
}