summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java b/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java
index ebad994033..57bfdbe822 100644
--- a/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java
+++ b/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
import junit.framework.TestCase;
@@ -60,7 +61,9 @@ public class WriteTestCase extends TestCase {
Composite composite = (Composite) staxProcessor.read(inputFactory.createXMLStreamReader(is), context);
assertNotNull(composite);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
- staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos), context);
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos);
+ staxProcessor.write(composite, writer, context);
+ writer.close();
assertTrue(bos.toString().contains("web-uri=\"MyWebapp\""));