StreamHelper { public static String base64EncodeMd5Digest(byte[] buffer) { return toBase64(DigestUtils.md5(buffer)); }  static long copy(InputStream in, OutputStream out); static String base64EncodeMd5Digest(byte[] buffer); static DigestOutputStream createMd5MessageOutputStream(OutputStream stream); static String base64Encode(MessageDigest messageDigest);  }
@Test public void base64EncodeMd5Digest() { assertEquals( "w/zT12GS5AB9+0lsymfhOw==", StreamHelper.base64EncodeMd5Digest(TEST_STR.getBytes())); }