@Test
public void locationTest() throws XMLStreamException, JAXBException {

    JAXBContext jaxbContext = JAXBContext.newInstance(MutableExecutable.class);
    XMLInputFactory inputFactory = XMLInputFactory.newFactory();
    StreamSource source = new StreamSource(getClass().getResourceAsStream("MutableLocatableTest.xml"),
        "file:/tmp/MutableLocatableTest.xml");
    XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source);
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    unmarshaller.setListener(new SourceCodeLocationListener(streamReader));
    MutableExecutable executable = (MutableExecutable) unmarshaller.unmarshal(streamReader);
    Location location;
    location = executable.getLocation();
    Assert.assertEquals(location.getSystemId(), "file:/tmp/MutableLocatableTest.xml");
    Assert.assertEquals(location.getLineNumber(), 2);
    Assert.assertTrue(location.getColumnNumber() >= 59 && location.getColumnNumber() <= 60);
    location = executable.getModule().getLocation();
    Assert.assertEquals(location.getSystemId(), "file:/tmp/MutableLocatableTest.xml");
    Assert.assertEquals(location.getLineNumber(), 7);
    Assert.assertTrue(location.getColumnNumber() >= 33 && location.getColumnNumber() <= 34);
}