@Test
public void testValidation() throws FileNotFoundException, JAXBException, IOException, SAXException {

    JAXBContext jaxb = JAXBContext.newInstance(XmlMatrix.class);
    Matrix m = new Matrix(5, 8);
    m.set((r, c) -> (r + 1) * (c + 1));
    XmlMatrix xmat = XmlMatrix.getAdapter().marshal(m);
    JAXBSource source = new JAXBSource(jaxb, xmat);
    Validator validator = Schemas.Core.newValidator();
    //validator.setErrorHandler(new TestErrorHandler());
    validator.validate(source);
}