void () { myFixture.addClass(""" @FunctionalInterface public interface MyInvalidFactory { <T, R> R create(T value); } """); Collection<? extends PsiType> suggestedTypes = suggestTypes("class Foo { Foo() {} Foo(int value) {} }", "Foo::new"); assertEquals(6, suggestedTypes.size()); assertFalse(suggestedTypes.stream().anyMatch(type -> "MyInvalidFactory".equals(type.getCanonicalText()))); }