@Test
    void test() throws ParserConfigurationException, SAXException, IOException, FastInfosetException {

        LOGGER.info("Serialise XML1 with no vocab");
        final byte[] fastInfosetBytes1a = ser(XML_1, null);

        LOGGER.info(LogUtil.inSeparatorLine("Deser 1"));
        deser(fastInfosetBytes1a, (ParserVocabulary) null);

//        final Vocabulary vocabulary1 = buildVocab(XML_1, null);
        var vocabs1 = buildVocab(
                XML_1,
                null,
                null);
        dumpVocabs(vocabs1);
        final Vocabulary vocabulary1 = vocabs1._1;

        LOGGER.info("Serialise XML1 with vocab1");
        final byte[] fastInfosetBytes1b = ser(XML_1, vocabs1._2);

        LOGGER.info("Serialise XML2 with vocab1");
        final byte[] fastInfosetBytes2a = ser(XML_2, vocabs1._2);

        LOGGER.info(LogUtil.inSeparatorLine("Deser 2a1"));
        deser(fastInfosetBytes2a, vocabs1._3);

        var vocabs2 = buildVocab(XML_2, vocabs1._2, vocabs1._3);
        dumpVocabs(vocabs2);
        final Vocabulary vocabulary2 = vocabs2._1;

        LOGGER.info("Serialise XML2 with vocab2");
        final byte[] fastInfosetBytes2b = ser(XML_2, vocabs2._2);

        LOGGER.info(LogUtil.inSeparatorLine("Deser 2a2"));
        deser(fastInfosetBytes2a, vocabs2._3);

        LOGGER.info(LogUtil.inSeparatorLine("Deser 2b2"));
        deser(fastInfosetBytes2b, vocabs2._3);

//        inputStream.reset();
//        byteArrayOutputStream.reset();
//        saxParser.reset();
//
//        final SerialiserHandler serialiserHandler2 = new SerialiserHandler();
//        serialiserHandler2.setOutputStream(byteArrayOutputStream);
//        serialiserHandler2.setVocab(vocabulary);
//        saxParser.parse(inputStream, serialiserHandler2);
//        final byte[] fastInfosetBytes2 = byteArrayOutputStream.toByteArray();
//
//        LOGGER.info("bytes len: {}", fastInfosetBytes2.length);

//        LOGGER.info("deser:\n{}", deser(fastInfosetBytes, vocabulary));
    }
A proof of concept for https://github.com/gchq/stroom/issues/1945
Trying to prove that we can generate a fast infoset vocab
for some xml and then append to it. This is to reduce the volume of data
stored in the LMDB ref data store.
stroom-pipeline/src/test/java/stroom/pipeline/refdata/TestFastInfosetVocab.java