void (@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { final int offset = getEditor().getCaretModel().getOffset(); final PsiElement psiElement = getFile().findElementAt(offset); assert psiElement != null; final Property property = PsiTreeUtil.getParentOfType(psiElement, Property.class); final PsiComment comment = myParser.createLineCommentFromText(PropertiesFileType.INSTANCE, actionHint.getExpectedText()); WriteAction.runAndWait(() -> property.getParent().addBefore(comment, property)); final String expectedFilePath = getBasePath() + "/after" + testName; checkResultByFile("In file: " + expectedFilePath, expectedFilePath, false); }