@Test
@Ignore
public void testMarshal() throws FileNotFoundException, JAXBException, IOException {

    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);
    FileOutputStream ostream = new FileOutputStream(FILE);
    try (OutputStreamWriter writer = new OutputStreamWriter(ostream, StandardCharsets.UTF_8)) {
        Marshaller marshaller = jaxb.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
        marshaller.marshal(xmat, writer);
        writer.flush();
    }
    XmlMatrix rslt = null;
    FileInputStream istream = new FileInputStream(FILE);
    try (InputStreamReader reader = new InputStreamReader(istream, StandardCharsets.UTF_8)) {
        Unmarshaller unmarshaller = jaxb.createUnmarshaller();
        unmarshaller.setSchema(Schemas.Core);
        unmarshaller.setEventHandler(new TestValidationEventHandler());
        rslt = (XmlMatrix) unmarshaller.unmarshal(reader);
        Matrix m2 = XmlMatrix.getAdapter().unmarshal(rslt);
        assertTrue(m.equals(m2, 1e-6));
    }
}