@Test
public void getShard() {

    IdGeneratorService idGeneratorService = new IdGeneratorService();
    for (int i = 0; i < 1024; i++) {
        long id = idGeneratorService.generate(i);
        assertEquals(idGeneratorService.getShard(id), i);
    }
}