LockTokenConverter { static LockToken toTokenV2(LockRefreshToken legacyToken) { return LockToken.of(toUuid(legacyToken.getTokenId())); } private  LockTokenConverter();   }
@Test public void throwsIfBigIntegerHasMoreThan127Bits() { BigInteger bigInt = BigInteger.valueOf(2).pow(127); LockRefreshToken token = new LockRefreshToken(bigInt, 0L); assertThatThrownBy(() -> LockTokenConverter.toTokenV2(token)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("too many bits"); }