@Udf(description = "Returns the hex-encoded md5 hash of the input string")
  public String md5(
      @UdfParameter(description = "The input string") final String s
  ) {
    if (s == null) {
      return null;
    }
    return DigestUtils.md5Hex(s);
  }
@Test
  public void shouldReturnHexString() {
    assertThat(udf.md5("one"), is("f97c5d29941bfb1b2fdab0874906ab82"));
    assertThat(udf.md5("two"), is("b8a9f715dbb64fd5c56e7783c6820a61"));
    assertThat(udf.md5("three"), is("35d6d33467aae9a2e3dccb4b6b027878"));
    assertThat(udf.md5(""), is("d41d8cd98f00b204e9800998ecf8427e"));
    assertThat(udf.md5(" "), is("7215ee9c7d9dc229d2921a40e899ec5f"));

    // Sanity check some strange Unicode characters
    assertThat(udf.md5("★☀☺"), is("670884f26d7be1298886c2e9d7c248a4"));

    // Now generate random input strings and compare results to DigestUtils
    for (int i = 0; i < 1000; i++) {
      String uuid = UUID.randomUUID().toString();
      assertThat(udf.md5(uuid), is(DigestUtils.md5Hex(uuid)));
    }
  }