@Udf
  public <T> String toJsonString(@UdfParameter final T input) {
    return toJson(input);
  }
@Test
  public void shouldSerializeMap() {
    // When:
    final Map<String, Integer> map = new HashMap<String, Integer>() {{
        put("c", 2);
        put("d", 4);
      }};
    final String result = udf.toJsonString(map);

    // Then:
    assertEquals("{\"c\":2,\"d\":4}", result);
  }