MD5s { public static boolean isHex(String value) { try { BaseEncoding.base16().lowerCase().decode(value); return true; } catch (IllegalArgumentException e) { return false; } }  static String toBase64(String hexMd5); static String toHex(String base64Md5); static boolean isBase64(String value); static boolean isHex(String value); static boolean isEqual(String firstMD5, String secondMD5);  }
@Test public void is_hex() { assertThat(MD5s.isHex(MD5_HEX_1)).isTrue(); }
@Test public void is_not_hex() { assertThat(MD5s.isHex(MD5_BASE64_1)).isFalse(); }