diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java b/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java index 7dcf70c711..4957f39c92 100644 --- a/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java +++ b/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/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,8 +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("application=\"test.MyJAXRSapp\"")); } |