Read File From Classpath
March 20, 2018
I have a test that requires complex XML input. I decided to put this in a file in a resources directory, and then read it from there for the test.
My file is in src/test/resources/examples/RouteDataExample.xml
In order to retrieve this into the test code, I needed to do:
InputStream is …