void () { configureFromFileText("a.java", """ class Foo { int bar() {return 1;} { <selection>bar();</selection> } }"""); SelectionModel model = getEditor().getSelectionModel(); PsiElement[] elements = new JavaExpressionSurroundDescriptor().getElementsToSurround(getFile(), model.getSelectionStart(), model.getSelectionEnd()); assertEmpty(elements); }