title: How to invoke default constructor using LambdaMetafactory
body: <p>In the link:
  <a href="https://stackoverflow.com/questions/53675777/how-to-instantiate-an-object-using-lambdametafactory">How to instantiate an object using LambdaMetaFactory?</a> it is mentioned how to instantiate a one-arg contrcutor using LambdaMetafactory.</p>
  
  <p>I am trying to do the same for default-constructor but is failing with the below error:</p>
  
  <pre><code>Exception in thread "main" java.lang.AbstractMethodError: Method com/test/Main$$Lambda$1.apply(Ljava/lang/Object;)Ljava/lang/Object; is abstract
  at com.test.Main$$Lambda$1/186370029.apply(Unknown Source)
  at com.test.Main.test2(Main.java:29)
  at com.test.Main.main(Main.java:14)
  </code></pre>
  
  <p>Code I am trying to run:</p>
  
  <pre><code>import java.lang.invoke.LambdaMetafactory;
  import java.lang.invoke.MethodHandle;
  import java.lang.invoke.MethodHandles;
  import java.lang.invoke.MethodType;
  import java.util.function.Function;
  
  public class Main {
  
    public static void main(String[] args) throws Throwable {
      long t2= System.nanoTime();
      for(int i=0;i&lt;10000;i++){
        test2(TestClass.class.getName());
      }
      long t3= System.nanoTime();
  
      System.out.println((t3-t2)*1e-9);
    }
  
    private static TestClass test2(String objclass)
        throws Throwable {
      Class clazz = Class.forName(objclass);
      MethodHandles.Lookup lookup = MethodHandles.lookup();
      MethodHandle mh = lookup.findConstructor(clazz, MethodType.methodType(void.class));
      Function&lt;String, TestClass&gt; constructor = (Function&lt;String, TestClass&gt;) LambdaMetafactory
          .metafactory(lookup, "apply",MethodType.methodType(Function.class),
              mh.type().generic(), mh, mh.type()).getTarget().invokeExact();
      TestClass testClass = constructor.apply(objclass);
      return testClass;
    }
  
  }
  </code></pre>
  
  <p>TestClass</p>
  
  <pre><code>import java.util.Collections;
  import java.util.Map;
  
  public class TestClass {
  
    public Map&lt;String, String&gt; getContextMap() {
      return Collections.emptyMap();
    }
  }
  </code></pre>
  
  <p>What am I doing wrong in order to invoke the default constructor using LambdaMetafactory?</p>