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

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

    // Then:
    MatcherAssert.assertThat(returnType, CoreMatchers.is(GenericType.of("T")));
  }