### Question:
HexStringComparator implements Comparator<String> { @Override public int compare(final String l, final String r) { final Bytes leftBytes = Bytes.fromHexString(l); final Bytes rightBytes = Bytes.fromHexString(r); return leftBytes.compareTo(rightBytes); }  @Override int compare(final String l, final String r);  }### Answer:
@Test void nonHexStringThrowsException() { final Throwable thrown = catchThrowable(() -> comparator.compare("NotHex", "0x01")); assertThat(thrown).isInstanceOf(IllegalArgumentException.class); }