public static ParamType getSchemaFromType(final Type type) {
    return getSchemaFromType(type, JAVA_TO_ARG_TYPE);
  }
@Test
  public void shouldGetArraySchemaFromListClass() throws NoSuchMethodException {
    final Type type = getClass().getDeclaredMethod("listType", List.class)
        .getGenericParameterTypes()[0];
    final ParamType schema = UdfUtil.getSchemaFromType(type);
    assertThat(schema, instanceOf(ArrayType.class));
    assertThat(((ArrayType) schema).element(), equalTo(ParamTypes.DOUBLE));
  }