Not sure how this is possible. I re-read up on getResourceAsStream and it\'s always returning null.
InputStream source = this.getClass().getResourceAsStream(
Assuming test.xml is located right under your test root source folder, do this:-
test.xml
test
InputStream source = this.getClass().getClassLoader().getResourceAsStream("test.xml");