void () { myFixture.allowTreeAccessForAllFiles(); addJavaFile("x/MyInterface.java", """ package x; public interface MyInterface { void doStuff(); } """); addJavaFile("x/MyConsumer.java", """ package x; public class MyConsumer { public void doIt(MyInterface i) { i.doStuff(); } }"""); addJavaFile("y/Test.java", """ package y; import x.MyConsumer; public class Test { void ddd(MyConsumer consumer) { consumer.doIt(() -> {}); } }"""); myFixture.configureByFiles("x/MyInterface.java", "y/Test.java", "x/MyConsumer.java"); myFixture.checkHighlighting(); }