### Question:
TextUtils { public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } }  static String unsignedToString(final long value); static String unsignedToString(final int value); static Integer unsignedInt(int value); static Long unsignedLong(long value); static boolean isHex(final char c); static boolean isOctal(final char c); static int digitValue(final char c); static boolean isDigits(final String text); static StringBuilder toStringBuilder(Readable input); static InputStream toInputStream(String input); static InputStream toInputStream(String input, Charset cs); static double parseDouble(final String text); static float parseFloat(final String text); static boolean parseBoolean(final String text); static int parseInt32(final String text); static int parseUInt32(final String text); static long parseInt64(final String text); static long parseUInt64(final String text); static long parseInteger(final String text,
            final boolean isSigned, final boolean isLong); static String escapeBytes(final ByteString input); static ByteString unescapeBytes(final CharSequence charString);  }### Answer:
@Test public void testDigitValueSuccess() { assertEquals(TextUtils.digitValue('0'), 0); assertEquals(TextUtils.digitValue('a'), 10); assertEquals(TextUtils.digitValue('A'), 10); assertEquals(TextUtils.digitValue('f'), 15); assertEquals(TextUtils.digitValue('F'), 15); assertEquals(TextUtils.digitValue('z'), 35); assertEquals(TextUtils.digitValue('Z'), 35); }
@Test public void testDigitValueError() throws IllegalArgumentException { boolean ret = true; try { TextUtils.digitValue('!'); } catch(IllegalArgumentException e) { ret = false; } assertFalse(ret); }