diff --git a/xml/tests/src/com/intellij/xml/XmlModificationsTest.java b/xml/tests/src/com/intellij/xml/XmlModificationsTest.java
new file mode 100644
index 000000000000..4c647e73d416
--- /dev/null
+++ b/xml/tests/src/com/intellij/xml/XmlModificationsTest.java
@@ -0,0 +1,45 @@
+// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+package com.intellij.xml;
+
+import com.intellij.psi.XmlElementFactory;
+import com.intellij.psi.xml.XmlTag;
+import com.intellij.testFramework.PsiTestCase;
+
+public class XmlModificationsTest extends PsiTestCase {
+ private XmlElementFactory myFactory;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ myFactory = XmlElementFactory.getInstance(getProject());
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ myFactory = null;
+
+ super.tearDown();
+ }
+
+ public void testAddAttribute1() {
+ final XmlTag tag = myFactory.createTagFromText("");
+ tag.setAttribute("b", "");
+ assertEquals("", tag.getText());
+ tag.setAttribute("c", "");
+ assertEquals("", tag.getText());
+ }
+
+ public void testAddAttribute2() {
+ final XmlTag tag = myFactory.createTagFromText("");
+ tag.setAttribute("b", "");
+ assertEquals("", tag.getText());
+ tag.setAttribute("c", "");
+ assertEquals("", tag.getText());
+ }
+
+ public void testAddSubTag1() {
+ final XmlTag tag = myFactory.createTagFromText("");
+ tag.add(tag.createChildTag("b", "", null, false));
+ assertEquals("", tag.getText());
+ }
+}