void () { final PsiFile psiFile = myFixture.configureByFile("foo.xml"); final PropertiesFile propertiesFile = PropertiesImplUtil.getPropertiesFile(psiFile); assertNotNull(propertiesFile); WriteCommandAction.runWriteCommandAction(getProject(), () -> { propertiesFile.addProperty("kkk", "vvv"); }); final IProperty property = propertiesFile.findPropertyByKey("kkk"); assertNotNull(property); assertEquals("vvv", property.getValue()); WriteCommandAction.runWriteCommandAction(getProject(), () -> { propertiesFile.addProperty("kkk2", "vvv"); }); final IProperty property2 = propertiesFile.findPropertyByKey("kkk2"); assertNotNull(property2); assertEquals("vvv", property2.getValue()); }