[cxf] branch master updated: cxf-tools-common: tests: use classpath resource resolving

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch master updated: cxf-tools-common: tests: use classpath resource resolving

buhhunyx
This is an automated email from the ASF dual-hosted git repository.

buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 27d9f6a  cxf-tools-common: tests: use classpath resource resolving
27d9f6a is described below

commit 27d9f6ac75162f9bbcfcf2bb2f5b569baf424a5d
Author: Alexey Markevich <[hidden email]>
AuthorDate: Wed Nov 18 14:26:41 2020 +0300

    cxf-tools-common: tests: use classpath resource resolving
---
 .../apache/cxf/tools/common/ProcessorTestBase.java |  56 +----
 .../org/apache/cxf/tools/common/TestFileUtils.java |   9 +-
 .../org/apache/cxf/tools/util/ToolsStaxUtils.java  |  66 +-----
 .../apache/cxf/tools/util/ToolsStaxUtilsTest.java  |   4 +-
 .../java2wsdl/processor/JavaToProcessorTest.java   | 236 ++++++++-------------
 .../jaxws/JaxwsServiceBuilderNoAnnoTest.java       |  14 +-
 .../internal/jaxws/JaxwsServiceBuilderRPCTest.java |  18 +-
 .../internal/jaxws/JaxwsServiceBuilderTest.java    |  74 +++----
 8 files changed, 152 insertions(+), 325 deletions(-)

diff --git a/tools/common/src/test/java/org/apache/cxf/tools/common/ProcessorTestBase.java b/tools/common/src/test/java/org/apache/cxf/tools/common/ProcessorTestBase.java
index ef7fb91..aff1734 100644
--- a/tools/common/src/test/java/org/apache/cxf/tools/common/ProcessorTestBase.java
+++ b/tools/common/src/test/java/org/apache/cxf/tools/common/ProcessorTestBase.java
@@ -28,7 +28,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -107,11 +106,6 @@ public class ProcessorTestBase {
         return getClass().getResource(wsdlFile).toURI().toString();
     }
 
-    protected File getResource(String wsdlFile) throws URISyntaxException {
-        return new File(getClass().getResource(wsdlFile).toURI());
-    }
-
-
     protected void assertFileEquals(String resource, File location) throws IOException {
         String str1 = TestFileUtils.getStringFromStream(getClass().getResourceAsStream(resource));
         String str2 = TestFileUtils.getStringFromFile(location);
@@ -149,52 +143,6 @@ public class ProcessorTestBase {
         assertTrue("Files did not match: " + unmatched, unmatched.isEmpty());
     }
 
-    public boolean assertXmlEquals(final File expected, final File source) throws Exception {
-        List<String> attr = Arrays.asList(new String[]{"attributeFormDefault", "elementFormDefault", "form"});
-        return assertXmlEquals(expected, source, attr);
-    }
-
-    public boolean assertXmlEquals(final File expected, final File source,
-                                   final List<String> ignoreAttr) throws Exception {
-        List<Tag> expectedTags = ToolsStaxUtils.getTags(expected);
-        List<Tag> sourceTags = ToolsStaxUtils.getTags(source);
-
-        Iterator<Tag> iterator = sourceTags.iterator();
-
-        for (Tag expectedTag : expectedTags) {
-            Tag sourceTag = iterator.next();
-            if (!expectedTag.getName().equals(sourceTag.getName())) {
-                throw new ComparisonFailure("Tags not equal: ",
-                                            expectedTag.getName().toString(),
-                                            sourceTag.getName().toString());
-            }
-            for (Map.Entry<QName, String> attr : expectedTag.getAttributes().entrySet()) {
-                if (ignoreAttr.contains(attr.getKey().getLocalPart())) {
-                    continue;
-                }
-
-                if (sourceTag.getAttributes().containsKey(attr.getKey())) {
-                    if (!sourceTag.getAttributes().get(attr.getKey()).equals(attr.getValue())) {
-                        throw new ComparisonFailure("Attributes not equal: ",
-                                                attr.getKey() + ":" + attr.getValue(),
-                                                attr.getKey() + ":"
-                                                + sourceTag.getAttributes().get(attr.getKey()));
-                    }
-                } else {
-                    throw new AssertionError("Attribute: " + attr + " is missing in the source file.");
-                }
-            }
-
-            if (!StringUtils.isEmpty(expectedTag.getText())
-                && !expectedTag.getText().equals(sourceTag.getText())) {
-                throw new ComparisonFailure("Text not equal: ",
-                                            expectedTag.getText(),
-                                            sourceTag.getText());
-            }
-        }
-        return true;
-    }
-
     protected void assertTagEquals(Tag expected, Tag source) {
         assertTagEquals(expected, source, DEFAULT_IGNORE_ATTR, DEFAULT_IGNORE_TAG);
     }
@@ -271,14 +219,14 @@ public class ProcessorTestBase {
         return null;
     }
 
-    public void assertWsdlEquals(final File expected, final File source, List<String> attr, List<String> tag)
+    public void assertWsdlEquals(final InputStream expected, final File source, List<String> attr, List<String> tag)
         throws Exception {
         Tag expectedTag = ToolsStaxUtils.getTagTree(expected, attr, qnameAtts);
         Tag sourceTag = ToolsStaxUtils.getTagTree(source, attr, qnameAtts);
         assertTagEquals(expectedTag, sourceTag, attr, tag);
     }
 
-    public void assertWsdlEquals(final File expected, final File source) throws Exception {
+    public void assertWsdlEquals(final InputStream expected, final File source) throws Exception {
         assertWsdlEquals(expected, source, DEFAULT_IGNORE_ATTR, DEFAULT_IGNORE_TAG);
     }
 
diff --git a/tools/common/src/test/java/org/apache/cxf/tools/common/TestFileUtils.java b/tools/common/src/test/java/org/apache/cxf/tools/common/TestFileUtils.java
index c79e485..6c769c7 100644
--- a/tools/common/src/test/java/org/apache/cxf/tools/common/TestFileUtils.java
+++ b/tools/common/src/test/java/org/apache/cxf/tools/common/TestFileUtils.java
@@ -32,17 +32,16 @@ public final class TestFileUtils {
     }
 
     public static String getStringFromFile(File location) throws IOException {
-        try (InputStream is = Files.newInputStream(location.toPath())) {
-            return getStringFromStream(is);
+        try (BufferedReader in = Files.newBufferedReader(location.toPath())) {
+            return normalizeCRLF(in);
         }
     }
 
     public static String getStringFromStream(InputStream is) throws IOException {
-        return normalizeCRLF(is);
+        return normalizeCRLF(new BufferedReader(new InputStreamReader(is)));
     }
 
-    private static String normalizeCRLF(InputStream instream) throws IOException {
-        BufferedReader in = new BufferedReader(new InputStreamReader(instream));
+    private static String normalizeCRLF(BufferedReader in) throws IOException {
         StringBuilder result = new StringBuilder();
         String line = in.readLine();
         while (line != null) {
diff --git a/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtils.java b/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtils.java
index 1380404..f060aaf 100644
--- a/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtils.java
+++ b/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtils.java
@@ -23,12 +23,8 @@ import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.InputStream;
 import java.nio.file.Files;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Deque;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -44,68 +40,10 @@ public final class ToolsStaxUtils {
     private ToolsStaxUtils() {
     }
 
-    public static List<Tag> getTags(final File source) throws Exception {
-        List<Tag> tags = new ArrayList<>();
-        Collection<String> ignoreEmptyTags = Collections.singleton("sequence");
-
-        try (InputStream is = new BufferedInputStream(Files.newInputStream(source.toPath()))) {
-            XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
-            Tag newTag = null;
-            int count = 0;
-            QName checkingPoint = null;
-
-            final Deque<Tag> stack = new ArrayDeque<>();
-
-            while (reader.hasNext()) {
-                int event = reader.next();
-
-                if (checkingPoint != null) {
-                    count++;
-                }
-
-                if (event == XMLStreamConstants.START_ELEMENT) {
-                    newTag = new Tag();
-                    newTag.setName(reader.getName());
-
-                    if (ignoreEmptyTags.contains(reader.getLocalName())) {
-                        checkingPoint = reader.getName();
-                    }
-
-                    for (int i = 0; i < reader.getAttributeCount(); i++) {
-                        newTag.getAttributes().put(reader.getAttributeName(i),
-                                reader.getAttributeValue(i));
-                    }
-                    stack.push(newTag);
-                } else if (event == XMLStreamConstants.CHARACTERS) {
-                    newTag.setText(reader.getText());
-                } else if (event == XMLStreamConstants.END_ELEMENT) {
-                    Tag startTag = stack.pop();
-
-                    if (checkingPoint != null && checkingPoint.equals(reader.getName())) {
-                        if (count == 1) {
-                            //Tag is empty, and it's in the ignore collection, so we just skip this tag
-                        } else {
-                            tags.add(startTag);
-                        }
-                        count = 0;
-                        checkingPoint = null;
-                    } else {
-                        tags.add(startTag);
-                    }
-                }
-            }
-            reader.close();
-        }
-        return tags;
+    public static Tag getTagTree(final InputStream source) throws Exception {
+        return getTagTree(source, Collections.emptyList(), null);
     }
 
-    public static Tag getTagTree(final File source) throws Exception {
-        return getTagTree(source, Collections.emptyList());
-    }
-
-    public static Tag getTagTree(final File source, final Collection<String> ignoreAttr) throws Exception {
-        return getTagTree(source, ignoreAttr, null);
-    }
     public static Tag getTagTree(final File source,
                                  final Collection<String> ignoreAttr,
                                  Map<QName, Set<String>> types) throws Exception {
diff --git a/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtilsTest.java b/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtilsTest.java
index 5795ffe..9671f91 100644
--- a/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtilsTest.java
+++ b/tools/common/src/test/java/org/apache/cxf/tools/util/ToolsStaxUtilsTest.java
@@ -30,7 +30,7 @@ public class ToolsStaxUtilsTest extends ProcessorTestBase {
 
     @Test
     public void testGetTags() throws Exception {
-        Tag tag1 = ToolsStaxUtils.getTagTree(getResource("resources/test2.wsdl"));
+        Tag tag1 = ToolsStaxUtils.getTagTree(getClass().getResourceAsStream("resources/test2.wsdl"));
         assertEquals(1, tag1.getTags().size());
         Tag def1 = tag1.getTags().get(0);
         assertEquals(6, def1.getTags().size());
@@ -38,7 +38,7 @@ public class ToolsStaxUtilsTest extends ProcessorTestBase {
         Tag schema1 = types1.getTags().get(0);
         assertEquals(4, schema1.getTags().size());
 
-        Tag tag2 = ToolsStaxUtils.getTagTree(getResource("resources/test3.wsdl"));
+        Tag tag2 = ToolsStaxUtils.getTagTree(getClass().getResourceAsStream("resources/test3.wsdl"));
         assertEquals(1, tag2.getTags().size());
         Tag def2 = tag2.getTags().get(0);
         assertEquals(6, def2.getTags().size());
diff --git a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
index 2e54bb3..df98a1b 100644
--- a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
+++ b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
@@ -21,8 +21,8 @@ package org.apache.cxf.tools.java2wsdl.processor;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.InputStream;
 import java.io.StringWriter;
-import java.net.URI;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -122,8 +122,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         processor.setEnvironment(env);
         processor.process();
 
-        URI expectedFile = getClass().getResource("expected/calculator.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "calculator.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/calculator.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "calculator.wsdl"));
 
     }
 
@@ -150,8 +150,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         processor.setEnvironment(env);
         processor.process();
 
-        URI expectedFile = getClass().getResource("expected/hello_soap12.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "hello_soap12.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/hello_soap12.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "hello_soap12.wsdl"));
     }
 
     @Test
@@ -222,8 +222,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         processor.setEnvironment(env);
         processor.process();
 
-        URI expectedFile = getClass().getResource("expected/db.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "db.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/db.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "db.wsdl"));
     }
 
     @Test
@@ -246,8 +246,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         processor.setEnvironment(env);
         processor.process();
 
-        URI expectedFile = getClass().getResource("expected/my_hello_soap12.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "my_hello_soap12.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/my_hello_soap12.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "my_hello_soap12.wsdl"));
     }
     @Test
     public void testGenWrapperBeanClasses() throws Exception {
@@ -310,7 +310,6 @@ public class JavaToProcessorTest extends ProcessorTestBase {
 
         File wsdlFile = new File(output, "hello.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
-
     }
 
     @Test
@@ -324,7 +323,6 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         File wsdlFile = new File(output, "hello-no-package.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
-
         String pkgBase = "defaultnamespace";
         File requestWrapperClass = new File(output, pkgBase + "/jaxws/SayHi.java");
         File responseWrapperClass = new File(output, pkgBase + "/jaxws/SayHiResponse.java");
@@ -341,8 +339,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
 
         File wsdlFile = new File(output, "rpc-hello.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
-        URI expectedFile = getClass().getResource("expected/rpc-hello-expected.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "rpc-hello.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/rpc-hello-expected.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "rpc-hello.wsdl"));
 
     }
 
@@ -355,9 +353,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
 
         File wsdlFile = new File(output, "xml-bare.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
-        URI expectedFile = getClass().getResource("expected/xml-bare-expected.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "/xml-bare.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/xml-bare-expected.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "/xml-bare.wsdl"));
     }
+
     @Test
     public void testXSDImports() throws Exception {
         //Testcase for CXF-1818
@@ -400,8 +399,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         File wsdlFile = new File(output, "fault.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/hello_world_fault_expected.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "/fault.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/hello_world_fault_expected.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "/fault.wsdl"));
     }
 
     @Test
@@ -432,8 +431,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         File bindingFile = new File(output, "echo_date.xjb");
         assertTrue(bindingFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/echo_date.xjb").toURI();
-        assertWsdlEquals(new File(expectedFile), bindingFile);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/echo_date.xjb");
+        assertWsdlEquals(expectedFile, bindingFile);
     }
 
     @Test
@@ -448,8 +447,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         File bindingFile = new File(output, "echo_calendar.xjb");
         assertTrue(bindingFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/echo_calendar.xjb").toURI();
-        assertWsdlEquals(new File(expectedFile), bindingFile);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/echo_calendar.xjb");
+        assertWsdlEquals(expectedFile, bindingFile);
     }
 
     @Test
@@ -459,17 +458,15 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_CLASSNAME,
                 org.apache.cxf.tools.fortest.cxf774.ListTestImpl.class.getName());
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "list_test.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/list_expected.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), new File(output, "/list_test.wsdl"));
+        InputStream expectedFile = getClass().getResourceAsStream("expected/list_expected.wsdl");
+        assertWsdlEquals(expectedFile, new File(output, "/list_test.wsdl"));
 
     }
 
@@ -478,17 +475,15 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/send_image.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, org.apache.cxf.tools.fortest.ImageSender.class.getName());
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "send_image.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/expected_send_image.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), wsdlFile);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_send_image.wsdl");
+        assertWsdlEquals(expectedFile, wsdlFile);
     }
 
     @Test
@@ -496,17 +491,15 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/send_image2.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, org.apache.cxf.tools.fortest.ImageSender2.class.getName());
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "send_image2.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
-        URI expectedFile = getClass().getResource("expected/expected_send_image2.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), wsdlFile);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_send_image2.wsdl");
+        assertWsdlEquals(expectedFile, wsdlFile);
     }
 
     @Test
@@ -514,12 +507,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/add_numbers.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.AddNumbersImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "add_numbers.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
         // To test there is wsam:action generated for the
@@ -534,8 +525,8 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         assertTrue("The wsaAction computed for empty FaultAction is not correct", wsdlString
             .contains("http://fortest.tools.cxf.apache.org/"
                      + "AddNumbersImpl/addNumbers4/Fault/AddNumbersException"));
-        URI expectedFile = getClass().getResource("expected/add_numbers_expected.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), wsdlFile);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/add_numbers_expected.wsdl");
+        assertWsdlEquals(expectedFile, wsdlFile);
     }
 
     // Test the Holder Parameter in the RequestWrapperBean and ResponseWrapperBean
@@ -546,12 +537,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         env.put(ToolConstants.CFG_WRAPPERBEAN, ToolConstants.CFG_WRAPPERBEAN);
         env.put(ToolConstants.CFG_CREATE_XSD_IMPORTS, ToolConstants.CFG_CREATE_XSD_IMPORTS);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         String pkgBase = "org/apache/cxf/tools/fortest/addr/jaxws";
         File requestWrapperClass = new File(output, pkgBase + "/AddNumbers.java");
@@ -574,12 +562,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         env.put(ToolConstants.CFG_WRAPPERBEAN, ToolConstants.CFG_WRAPPERBEAN);
         env.put(ToolConstants.CFG_CREATE_XSD_IMPORTS, ToolConstants.CFG_CREATE_XSD_IMPORTS);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "inherit.wsdl");
         assertTrue(wsdlFile.exists());
@@ -592,12 +577,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.refparam.AddNumbersImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         env.put(ToolConstants.CFG_WRAPPERBEAN, ToolConstants.CFG_WRAPPERBEAN);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         String pkgBase = "org/apache/cxf/tools/fortest/refparam/jaxws";
         File requestWrapperClass = new File(output, pkgBase + "/AddNumbers.java");
@@ -614,12 +596,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.action.AddNumbersImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         env.put(ToolConstants.CFG_WRAPPERBEAN, ToolConstants.CFG_WRAPPERBEAN);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "action.wsdl");
         assertTrue(wsdlFile.exists());
@@ -632,12 +611,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.epr.AddNumbersImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
         env.put(ToolConstants.CFG_CREATE_XSD_IMPORTS, ToolConstants.CFG_CREATE_XSD_IMPORTS);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "epr_schema1.xsd");
         assertTrue(wsdlFile.exists());
@@ -652,12 +628,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.simple.Caculator");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "exception.wsdl");
         assertTrue(wsdlFile.exists());
@@ -700,12 +673,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/cxf1519.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.cxf1519.EndpointImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "cxf1519.wsdl");
         assertTrue(wsdlFile.exists());
@@ -724,12 +694,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/cxf4147.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.java2wsdl.processor.HelloBare");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "cxf4147.wsdl");
         assertTrue(wsdlFile.exists());
         String wsdlContent = TestFileUtils.getStringFromFile(wsdlFile);
@@ -746,12 +714,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         //env.put(ToolConstants.CFG_OUTPUTFILE, "/x1/tmp/exception_prop_order.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.EchoImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "exception_prop_order.wsdl");
         assertTrue(wsdlFile.exists());
 
@@ -791,12 +757,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         //env.put(ToolConstants.CFG_OUTPUTFILE, "/x1/tmp/exception_prop_order.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo5Impl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "exception_prop_order2.wsdl");
         assertTrue(wsdlFile.exists());
 
@@ -835,12 +799,10 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception_order.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.OrderEchoImpl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
+
         File wsdlFile = new File(output, "exception_order.wsdl");
         assertTrue(wsdlFile.exists());
 
@@ -879,12 +841,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception_list.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo2Impl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "exception_list.wsdl");
         assertTrue(wsdlFile.exists());
@@ -916,12 +875,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception-ref-nillable.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo3Impl");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "exception-ref-nillable.wsdl");
         assertTrue(wsdlFile.exists());
@@ -944,12 +900,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception-type-adapter.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.TypeAdapterEcho");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "exception-type-adapter.wsdl");
         assertTrue(wsdlFile.exists());
@@ -990,12 +943,9 @@ public class JavaToProcessorTest extends ProcessorTestBase {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/transient_message.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo4");
         env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
-        try {
-            processor.setEnvironment(env);
-            processor.process();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+        processor.setEnvironment(env);
+        processor.process();
 
         File wsdlFile = new File(output, "transient_message.wsdl");
         assertTrue(wsdlFile.exists());
diff --git a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
index 0171a66..1915144 100644
--- a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
+++ b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
@@ -20,7 +20,7 @@
 package org.apache.cxf.tools.java2wsdl.processor.internal.jaxws;
 
 import java.io.File;
-import java.net.URI;
+import java.io.InputStream;
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.common.jaxb.JAXBContextCache;
@@ -58,8 +58,8 @@ public class JaxwsServiceBuilderNoAnnoTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = getClass().getResource("expected/stock_noanno_bare.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/stock_noanno_bare.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
 
@@ -73,8 +73,8 @@ public class JaxwsServiceBuilderNoAnnoTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = getClass().getResource("expected/stock_noanno_wrapped.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/stock_noanno_wrapped.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
 
@@ -92,8 +92,8 @@ public class JaxwsServiceBuilderNoAnnoTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = getClass().getResource("expected/stock_noanno_rpc.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/stock_noanno_rpc.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     private File getOutputFile(String fileName) {
diff --git a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
index 1e8fbf9..951ae28 100644
--- a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
+++ b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderRPCTest.java
@@ -20,6 +20,7 @@
 package org.apache.cxf.tools.java2wsdl.processor.internal.jaxws;
 
 import java.io.File;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -58,22 +59,17 @@ public class JaxwsServiceBuilderRPCTest extends ProcessorTestBase {
         builder.setServiceClass(org.apache.cxf.tools.fortest.jaxws.rpc.Greeter.class);
         ServiceInfo service = builder.createService();
         generator.setServiceModel(service);
-        File output = getOutputFile("rpc_greeter.wsdl");
-        assertNotNull(output);
-        generator.generate(output);
-        assertTrue(output.exists());
+        File wsdlFile = new File(output, "rpc_greeter.wsdl");
+        assertNotNull(wsdlFile);
+        generator.generate(wsdlFile);
+        assertTrue(wsdlFile.exists());
 
-        File expectedFile = new File(this.getClass()
-            .getResource("expected/rpc_greeter.wsdl").toURI());
+        InputStream expectedFile = getClass().getResourceAsStream("expected/rpc_greeter.wsdl");
 
         //MOXy doesn't put a final attribute on the array types, we can ignore that
         //for the purpose of this test
         List<String> ignores = new ArrayList<>(DEFAULT_IGNORE_ATTR);
         ignores.add("final");
-        assertWsdlEquals(expectedFile, output, ignores, DEFAULT_IGNORE_TAG);
-    }
-
-    private File getOutputFile(String fileName) {
-        return new File(output, fileName);
+        assertWsdlEquals(expectedFile, wsdlFile, ignores, DEFAULT_IGNORE_TAG);
     }
 }
\ No newline at end of file
diff --git a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
index 0765f1f..6d4aea5 100644
--- a/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
+++ b/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
@@ -20,7 +20,7 @@
 package org.apache.cxf.tools.java2wsdl.processor.internal.jaxws;
 
 import java.io.File;
-import java.net.URI;
+import java.io.InputStream;
 import java.nio.file.Files;
 import java.util.Collection;
 
@@ -86,9 +86,9 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass()
-            .getResource("expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass()
+            .getResourceAsStream("expected/expected_doc_lit_wrapped_with_wrapperclass.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -102,9 +102,9 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass()
-            .getResource("expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass()
+            .getResourceAsStream("expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
 
@@ -119,9 +119,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_hello_world_doc_lit.wsdl")
-            .toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_hello_world_doc_lit.wsdl");
+        assertWsdlEquals(expectedFile, output);
         //assertFileEquals(expectedFile, output.getAbsolutePath());
     }
 
@@ -136,9 +135,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_doc_lit_wrapped_localName.wsdl")
-            .toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_doc_lit_wrapped_localName.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -152,9 +150,9 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass()
-            .getResource("expected/expected_doc_lit_wrapped_no_webparam.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass()
+            .getResourceAsStream("expected/expected_doc_lit_wrapped_no_webparam.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -168,8 +166,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_holder.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_holder.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -182,10 +180,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_hello_world_async.wsdl")
-            .toURI();
-
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_hello_world_async.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -200,8 +196,9 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(file);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_rpc_lit.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), file);
+
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_rpc_lit.wsdl");
+        assertWsdlEquals(expectedFile, file);
     }
 
     @Test
@@ -216,8 +213,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(file);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/doc_wrapped_bare.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), file);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/doc_wrapped_bare.wsdl");
+        assertWsdlEquals(expectedFile, file);
     }
 
     @Test
@@ -231,8 +228,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(file);
         assertTrue(output.exists());
         
-        URI expectedFile = this.getClass().getResource("expected/rpc_lit_service_no_anno.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), file);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/rpc_lit_service_no_anno.wsdl");
+        assertWsdlEquals(expectedFile, file);
     }
 
     @Test
@@ -246,8 +243,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(file);
         assertTrue(output.exists());
         
-        URI expectedFile = this.getClass().getResource("expected/rpc_on_method.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), file);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/rpc_on_method.wsdl");
+        assertWsdlEquals(expectedFile, file);
     }
 
     @Test
@@ -262,8 +259,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(file);
         assertTrue(file.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/soap_header.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), file);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/soap_header.wsdl");
+        assertWsdlEquals(expectedFile, file);
     }
 
     @Test
@@ -277,8 +274,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/expected_someheaders.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_someheaders.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -294,8 +291,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
         generator.generate(output);
         assertTrue(output.exists());
 
-        URI expectedFile = this.getClass().getResource("expected/cxf188.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/cxf188.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test
@@ -318,9 +315,8 @@ public class JaxwsServiceBuilderTest extends ProcessorTestBase {
 
         String s = new String(Files.readAllBytes(output.toPath()));
         assertTrue(s.indexOf("EchoPort") != -1);
-        URI expectedFile = this.getClass()
-            .getResource("expected/expected_rpclist_no_sei.wsdl").toURI();
-        assertWsdlEquals(new File(expectedFile), output);
+        InputStream expectedFile = getClass().getResourceAsStream("expected/expected_rpclist_no_sei.wsdl");
+        assertWsdlEquals(expectedFile, output);
     }
 
     @Test