static SelType callJavaMethod(Object javaObj, SelType[] args, MethodHandle m, String methodName) {
    try {
      if (args.length == 0) {
        return callJavaMethod0(javaObj, m);
      } else if (args.length == 1) {
        return callJavaMethod1(javaObj, args[0], m);
      } else if (args.length == 2) {
        return callJavaMethod2(javaObj, args[0], args[1], m);
      }
    } catch (IllegalStateException e) {
      throw e;
    } catch (Throwable t) {
      throw new IllegalArgumentException("Failed calling method " + methodName, t);
    }
    throw new UnsupportedOperationException(
        "DO NOT support calling method: " + methodName + " with args: " + Arrays.toString(args));
  }
@Test
  public void testCallJavaMethodWithoutArg() throws Throwable {
    m1 =
        MethodHandles.lookup()
            .findStatic(MockType.class, "staticNoArg", MethodType.methodType(void.class));
    m2 =
        MethodHandles.lookup()
            .findVirtual(MockType.class, "noArg", MethodType.methodType(String.class));
    SelType res = SelTypeUtil.callJavaMethod(null, new SelType[0], m1, "staticNoArg");
    assertEquals(SelType.NULL, res);
    res = SelTypeUtil.callJavaMethod(new MockType(), new SelType[0], m2, "noArg");
    assertEquals(SelTypes.STRING, res.type());
    assertEquals("noArg", res.toString());
  }