{
IdAllocator a = new IdAllocator();
assertEquals(a.allocateId("d_1"), "d_1");
assertEquals(a.allocateId("d"), "d");
assertEquals(a.allocateId("d"), "d_0");
assertEquals(a.allocateId("d"), "d_2");
assertEquals(a.allocateId("d"), "d_3");
assertEquals(a.allocateId("d_1"), "d_1_0");