public static ParamType getVarArgsSchemaFromType(final Type type) {
    return getSchemaFromType(type, VARARGS_JAVA_TO_ARG_TYPE);
  }
@Test
  public void shouldGetPartialGenericFunctionVariadic() throws NoSuchMethodException {
    // Given:
    final Type genericType = getClass().getMethod("partialGenericFunctionType").getGenericReturnType();

    // When:
    final ParamType returnType = UdfUtil.getVarArgsSchemaFromType(genericType);

    // Then:
    assertThat(returnType, is(LambdaType.of(ImmutableList.of(ParamTypes.LONG), GenericType.of("U"))));
  }