### Question:
DigestUtils { public static String md5Hex(String password) { String md5 = ""; if ( password == null || password.isEmpty() ) { return ""; } try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(password.getBytes()); byte byteData[] = md.digest(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < byteData.length; i++) { sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1)); } md5 = sb.toString(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return md5; } private  DigestUtils(); static String md5Hex(String password); static String getGuid();  }### Answer:
@Test public void testMd5HexCase1() { String password = "zjhzxhz"; String runtimeValue = DigestUtils.md5Hex(password); String expectedValue = "785ee107c11dfe36de668b1ae7baacbb"; Assertions.assertEquals(expectedValue, runtimeValue); }
@Test public void testMd5HexCase2() { String password = "meigaofei0926"; String runtimeValue = DigestUtils.md5Hex(password); String expectedValue = "0adb82835139278edb78d1e8c4548600"; Assertions.assertEquals(expectedValue, runtimeValue); }
@Test public void testMd5HexEmpty() { String password = ""; String runtimeValue = DigestUtils.md5Hex(password); String expectedValue = ""; Assertions.assertEquals(expectedValue, runtimeValue); }