void () { myFixture.addClass(""" @FunctionalInterface public interface MyFactory<T, R> { R create(T value); } """); Collection<? extends PsiType> suggestedTypes = suggestTypes("import java.math.BigDecimal; class Foo { Foo() {} Foo(int value) {} Foo(BigDecimal value) {} }", "Foo::new"); checkWithExpected(suggestedTypes,"MyFactory<java.lang.Integer,Foo>", "MyFactory<java.math.BigDecimal,Foo>", "java.lang.Runnable", "java.util.concurrent.Callable<Foo>", "java.util.function.Function<java.lang.Integer,Foo>", "java.util.function.Function<java.math.BigDecimal,Foo>", "java.util.function.IntConsumer", "java.util.function.IntFunction<Foo>", "java.util.function.Supplier<Foo>"); }