void () { @Language("JAVA") String text = """ class Foo { int field; int field2; int field3; int getField() { return field; } void setField(int f) { field = f; } void setField2(int f){field2=f;} // normal method folding here // normal method folding here void setField3(int f){ field2=f; } }"""; configure(text); PsiClass fooClass = JavaPsiFacade.getInstance(getProject()).findClass("Foo", GlobalSearchScope.allScope(getProject())); FoldRegion[] regions = Stream.of(myFixture.getEditor().getFoldingModel().getAllFoldRegions()) .sorted(Comparator.comparingInt(reg -> reg.getStartOffset())).toArray(FoldRegion[]::new); assertEquals(6, regions.length); checkAccessorFolding(regions[0], regions[1], fooClass.getMethods()[0]); checkAccessorFolding(regions[2], regions[3], fooClass.getMethods()[1]); assertEquals("{...}", regions[4].getPlaceholderText()); assertEquals("{...}", regions[5].getPlaceholderText()); }