void (String text, final String extension, final String expected) { String finalText = !text.contains("<selection>") ? "<selection>" + text + "</selection>" : text; PlatformTestUtil.withEncoding("UTF-8", () -> { myFixture.configureByText(getTestName(true) + "." + extension, finalText); myFixture.performEditorAction("EscapeEntities"); myFixture.checkResult(expected); }); }