void () { final String directoryName = getDirName(); String filesExtension = "json"; EdtTestUtil.runInEdtAndWait(() -> { myFixture.copyDirectoryToProject(directoryName, directoryName); myFixture.configureByFile(directoryName + "/before." + filesExtension); Editor editor = myFixture.getEditor(); boolean camelWords = editor.getSettings().isCamelWords(); try { editor.getSettings().setCamelWords(true); int i = 1; while (true) { final String fileName = directoryName + "/after" + i + "." + filesExtension; if (new File(myFixture.getTestDataPath() + "/" + fileName).exists()) { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_SELECT_WORD_AT_CARET); myFixture.checkResultByFile(fileName); i++; } else { break; } } assertTrue("At least one 'after'-file required", i > 1); } finally { editor.getSettings().setCamelWords(camelWords); } }); }