void (Surrounder surrounder) { configureByFile(BASE_PATH + getTestName(false) + ".java"); SelectionModel selectionModel = getEditor().getSelectionModel(); List<SurroundDescriptor> descriptors = LanguageSurrounders.INSTANCE.allForLanguage(JavaLanguage.INSTANCE); boolean atLeastOneFound = false; for (SurroundDescriptor item : descriptors) { PsiElement[] elements = item.getElementsToSurround(getFile(), selectionModel.getSelectionStart(), selectionModel.getSelectionEnd()); if (elements.length != 0) { assertFalse("applicable " + item, surrounder.isApplicable(elements)); atLeastOneFound = true; } } assertTrue("atLeastOneFound", atLeastOneFound); }