@Udf(description = "Converts a TIMESTAMP value into the"
      + " string representation of the timestamp in the given format. Single quotes in the"
      + " timestamp format can be escaped with '', for example: 'yyyy-MM-dd''T''HH:mm:ssX'"
      + " The system default time zone is used when no time zone is explicitly provided."
      + " The format pattern should be in the format expected"
      + " by java.time.format.DateTimeFormatter")
  public String formatTimestamp(
      @UdfParameter(
          description = "TIMESTAMP value.") final Timestamp timestamp,
      @UdfParameter(
          description = "The format pattern should be in the format expected by"
              + " java.time.format.DateTimeFormatter.") final String formatPattern) {
    return formatTimestamp(timestamp, formatPattern, ZoneId.of("GMT").getId());
  }
@Test
  public void shouldReturnNullOnNullTimeZone() {
    // When:
    final String returnValue = udf.formatTimestamp( new Timestamp(1534353043000L), "yyyy-MM-dd", null);

    // Then:
    assertThat(returnValue, is(nullValue()));
  }