From b365001559cc17f7bf90181b0b344a26b95752ab Mon Sep 17 00:00:00 2001 From: Alberto <8672431+albertus82@users.noreply.github.com> Date: Thu, 2 May 2024 13:12:18 +0200 Subject: [PATCH] Update UUIDUtilsTest.java --- .../io/github/albertus82/storage/jdbc/UUIDUtilsTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/github/albertus82/storage/jdbc/UUIDUtilsTest.java b/src/test/java/io/github/albertus82/storage/jdbc/UUIDUtilsTest.java index 8feed91..550dfcc 100644 --- a/src/test/java/io/github/albertus82/storage/jdbc/UUIDUtilsTest.java +++ b/src/test/java/io/github/albertus82/storage/jdbc/UUIDUtilsTest.java @@ -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);