@Test
public void lowerHexToUnsignedLongTest() {

  assertThat(lowerHexToUnsignedLong("ffffffffffffffff")).isEqualTo(-1);
  assertThat(lowerHexToUnsignedLong(Long.toHexString(Long.MAX_VALUE))).isEqualTo(Long.MAX_VALUE);
  try {
    lowerHexToUnsignedLong("0"); // invalid
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong(Character.toString((char) ('9' + 1))); // invalid
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong(Character.toString((char) ('0' - 1))); // invalid
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong(Character.toString((char) ('f' + 1))); // invalid
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong(Character.toString((char) ('a' - 1))); // invalid
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong("fffffffffffffffffffffffffffffffff"); // too long
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong(""); // too short
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
  try {
    lowerHexToUnsignedLong("rs"); // bad charset
    failBecauseExceptionWasNotThrown(NumberFormatException.class);
  } catch (NumberFormatException e) {
  }
}