diff --git a/test/bytecode/LambdaTest.java b/test/bytecode/LambdaTest.java index 1e13ac77..9adfe5b8 100644 --- a/test/bytecode/LambdaTest.java +++ b/test/bytecode/LambdaTest.java @@ -33,11 +33,10 @@ public class LambdaTest { instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); Method m = classToTest.getDeclaredMethod("m"); - //Class - Object lambda = (m.invoke(instanceOfClass)); //.getClass(); - //Method apply = lambda.getMethod("apply", Integer.class); - //Integer result = (Integer) apply.invoke(lambda, 77); - //assertEquals(77, result); + Class lambda = m.invoke(instanceOfClass).getClass(); + Method apply = lambda.getMethod("apply", Object.class); + Integer result = (Integer) apply.invoke(lambda, new Integer(77)); //laeuft nicht, vermutlich weil Lambda-Ausdruck private + assertEquals(77, result); }