Method handle_with_capture = moduleClass.getMethod("handle_with_capture", Object.class, Object.class);
result = handle_with_capture.invoke(null, 1, 2);
assertThat(result, instanceOf(MethodHandle.class));
handle = (MethodHandle) result;
assertThat(handle.type(), is(genericMethodType(1)));
assertThat((Integer) handle.invoke(100), is(300));
assertThat((Integer) handle.invoke(10), is(30));
Method call_with_invoke = moduleClass.getMethod("call_with_invoke");
assertThat((Integer) call_with_invoke.invoke(null), is(90));