Cleanup resources allocated in @BeforeClass
[yangtools.git] / yang / yang-data-codec-xml / src / test / java / org / opendaylight / yangtools / yang / data / codec / xml / XmlStreamUtilsTest.java
index 1d7e209ed011a0a6d4079802ed48904a63a636b4..5447f05eac2b39504221907b60a33913e128f138 100644 (file)
@@ -26,6 +26,7 @@ import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamWriter;
 import org.custommonkey.xmlunit.Diff;
 import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -61,6 +62,12 @@ public class XmlStreamUtilsTest {
         assertNotNull(leafRefModule);
     }
 
+    @AfterClass
+    public static void cleanup() {
+        leafRefModule = null;
+        schemaContext = null;
+    }
+
     @Test
     public void testWriteAttribute() throws Exception {
         final ByteArrayOutputStream out = new ByteArrayOutputStream();