public static ParamType getVarArgsSchemaFromType(final Type type) {
    return getSchemaFromType(type, VARARGS_JAVA_TO_ARG_TYPE);
  }
@Test
  public void shouldGetMapSchemaFromMapClassVariadic() throws NoSuchMethodException {
    final Type type = getClass().getDeclaredMethod("mapType", Map.class)
            .getGenericParameterTypes()[0];
    final ParamType schema = UdfUtil.getVarArgsSchemaFromType(type);
    assertThat(schema, instanceOf(MapType.class));
    assertThat(((MapType) schema).value(), equalTo(ParamTypes.INTEGER));
  }