XmlBox xmlBox = new XmlBox();
xmlBox.setXml("<a></a>"); // but the box doesnt care if well-formed
ByteArrayOutputStream baos = new ByteArrayOutputStream();
xmlBox.getBox(Channels.newChannel(baos));
Properties props = new Properties();
props.put("xml ", XmlBox.class.getName() + "()");
PropertyBoxParserImpl parser = new PropertyBoxParserImpl(props);
IsoFile isoFile = new IsoFile(new ByteBufferByteChannel((ByteBuffer) ByteBuffer.wrap(baos.toByteArray()).rewind()), parser);
Assert.assertTrue(!isoFile.getBoxes().isEmpty());
XmlBox xmlBox2 = (XmlBox) isoFile.getBoxes().get(0);
Assert.assertEquals(xmlBox.getXml(), xmlBox2.getXml());