Skip to content

Commit

Permalink
Update UUIDUtilsTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
albertus82 committed May 2, 2024
1 parent e14e8e6 commit b365001
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ class UUIDUtilsTest {

@Test
void test() {
final UUID a = UUID.randomUUID();
test(new UUID(0, 0));
for (short i = 0; i < Short.MAX_VALUE; i++) {
test(UUID.randomUUID());
}
test(new UUID(0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFL));
}

private static void test(final UUID a) {
final String s = UUIDUtils.toBase64Url(a);
Assertions.assertEquals(22, s.length());
final UUID b = UUIDUtils.fromBase64Url(s);
Expand Down

0 comments on commit b365001

Please sign in to comment.