/** * Test entry IDs. * * @throws Exception If the test failed unexpectedly. */ @Test() public void testEntryIDToAndFromDatabase() throws Exception { long[] vals = {128, 1234567, 0, 1, -1, 2 ^ 32 - 1, 2 ^ 63 - 1}; for (long before : vals) { byte[] bytes = JebFormat.entryIDToDatabase(before); long after = JebFormat.entryIDFromDatabase(bytes); assertEquals(before, after); } }