TraceAndSpanIdGenerator { public static long unsignedLowerHexStringToLong(String hexString) { return ZipkinHexHelpers.lowerHexToUnsignedLong(hexString); } private  TraceAndSpanIdGenerator(); static String generateId(); static long generate64BitRandomLong(); static String longToUnsignedLowerHexString(long primitiveLong); static long unsignedLowerHexStringToLong(String hexString); static long unsignedLowerHexStringToLong(String hexString, int index);  }
@DataProvider(value = { " ", "123e4567-e89b-12d3-a456-426655440000 ", "/ ", ": ", "` ", "g ", "ABCDEF " }, splitBy = "\\|") @Test public void unsignedLowerHexStringToLong_throws_NumberFormatException_for_illegal_args(final String badHexString) { Throwable ex = catchThrowable(new ThrowableAssert.ThrowingCallable() { @Override public void call() throws Throwable { TraceAndSpanIdGenerator.unsignedLowerHexStringToLong(badHexString); } }); assertThat(ex).isInstanceOf(NumberFormatException.class); ex = catchThrowable(new ThrowableAssert.ThrowingCallable() { @Override public void call() throws Throwable { TraceAndSpanIdGenerator.unsignedLowerHexStringToLong(badHexString, 0); } }); assertThat(ex).isInstanceOf(NumberFormatException.class); }