public static ParamType getSchemaFromType(final Type type) {
    return getSchemaFromType(type, JAVA_TO_ARG_TYPE);
  }
@Test
  public void shouldGetBiFunction() throws NoSuchMethodException {
    final Type type = getClass().getDeclaredMethod("biFunctionType", BiFunction.class)
        .getGenericParameterTypes()[0];
    final ParamType schema = UdfUtil.getSchemaFromType(type);
    assertThat(schema, instanceOf(LambdaType.class));
    assertThat(((LambdaType) schema).inputTypes(), equalTo(ImmutableList.of(ParamTypes.LONG, ParamTypes.INTEGER)));
    assertThat(((LambdaType) schema).returnType(), equalTo(ParamTypes.BOOLEAN));
  }