void () { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "#xxxxx\n")); WriteCommandAction.runWriteCommandAction(getProject(), () -> { propertiesFile.addProperty(myPropertyToAdd); }); PsiTestUtil.checkFileStructure((PsiFile)propertiesFile); List<IProperty> properties = propertiesFile.getProperties(); IProperty added = properties.get(0); assertPropertyEquals(added, myPropertyToAdd.getName(), myPropertyToAdd.getValue()); }