void () { @Language("JAVA") String template = """ import java.util.Map; class X { public void foo() { Map<Integer, Class<?>> map = ofEntries( $entries$ ); } static native <K, V> Map<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries); static native <K, V> Map.Entry<K, V> entry(K k, V v); } """; int count = 70; String entries = IntStreamEx.range(count).mapToObj(i -> "entry(" + i + ", String.class)").joining(",\n "); configureFromFileText("Test.java", template.replace("$entries$", entries)); PlatformTestUtil.startPerformanceTest(count + " arguments to Map.ofEntries", 3000, () -> doHighlighting()) .setup(() -> PsiManager.getInstance(getProject()).dropPsiCaches()) .usesAllCPUCores().assertTiming(); assertEmpty(highlightErrors()); }