void () { final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(myFixture.configureByText(PropertiesFileType.INSTANCE, "xxx=yyy")); WriteCommandAction.runWriteCommandAction(null, () -> { propertiesFile.addProperty(myPropertyToAdd); }); PsiTestUtil.checkFileStructure((PsiFile)propertiesFile); List<IProperty> properties = propertiesFile.getProperties(); assertEquals(2, properties.size()); assertPropertyEquals(properties.get(1), "xxx", "yyy"); assertPropertyEquals(properties.get(0), myPropertyToAdd.getName(), myPropertyToAdd.getValue()); }