@Test public void test3() throws IOException { for (int i = 0; i < 300; i++) { idSource.getNextId(); } }
@Test public void test() throws IOException { // 001-100 // 101-200 // 201-300 long s = System.currentTimeMillis(); for (int i = 0; i < 10000; i++) { idSource.getNextId(); } long e = System.currentTimeMillis(); System.out.println((e - s) + "ms"); idSource.close(); idSource = new FileIdSequence(file, 100); assertEquals(10001l, idSource.getNextId()); }