!7 cmodule2 > DynTestModule { void test { new DynamicObject o; // make o dynamically implement IF0 addDynamicInterface(o, IF0, () -> "hello"); // check that the dynamic implementation works assertEqualsVerbose("hello", lookupDynamicInterface(o, IF0).get()); // and that we get null for non-implemented interfaces assertNullVerbose(lookupDynamicInterface(o, IF1)); } }