XMLContext context = new XMLContext();
InputStream strmMapping = this.getClass().getClassLoader().getResourceAsStream("withmapping-mapping.xml");
Assert.assertNotNull("InputStream of mapping must not be null", strmMapping);
InputSource srcMapping = new InputSource(strmMapping);
Assert.assertNotNull("InputSource of mapping must not be null", srcMapping);
Mapping mapping = new Mapping();
mapping.loadMapping(srcMapping);
context.addMapping(mapping);
Unmarshaller unmarshaller = context.createUnmarshaller();
InputStream stream = this.getClass().getClassLoader().getResourceAsStream("withmapping-input.xml");
Assert.assertNotNull("InputStream must not be null", stream);
InputSource is = new InputSource(stream);