private void run(ParserSerializerTestsuite testSuite, Testcase testcase) throws ParserSerializerTestsuiteException {
        LOGGER.info("Running testcase {}", testcase);
        byte[] testcaseRaw = testcase.getRaw();
        if (LOGGER.isDebugEnabled())
            LOGGER.debug("\n{}", AsciiBoxWriter.DEFAULT.boxString("Testcase raw input", org.apache.plc4x.java.spi.utils.hex.Hex.dump(testcaseRaw), 0));
        ReadBufferByteBased readBuffer = new ReadBufferByteBased(testcaseRaw, testSuite.getByteOrder());

        try {
            MessageInput<?> messageInput = MessageResolver.getMessageIOStaticLinked(
                testSuite.getOptions(),
                testcase.getRootType(),
                testcase.getParserArguments()
            );

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Parse the raw bytes into a message
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////

            LOGGER.trace("Parsing message");
            Message parsedOutput = (Message) messageInput.parse(readBuffer);
            LOGGER.trace("Validating and migrating");

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Compare the parsed message with the reference XML
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////

            // In this case no reference xml has been provided
            // (This is usually during development)
            if (testcase.getXml().elements().size() == 0) {
                WriteBufferXmlBased writeBufferXmlBased = new WriteBufferXmlBased();
                parsedOutput.serialize(writeBufferXmlBased);
                String xmlString = writeBufferXmlBased.getXmlString();
                throw new ParserSerializerTestsuiteException("Missing reference xml element. Parsed: \n" + xmlString);
            }
            // If more than one root element is provided, the testcase is corrupt.
            else if (testcase.getXml().elements().size() > 1) {
                throw new ParserSerializerTestsuiteException("Too many element roots in testcase");
            }
            boolean migrated = MessageValidatorAndMigrator.validateOutboundMessageAndMigrate(
                testcase.getName(),
                messageInput,
                testcase.getXml().elements().get(0),
                testcaseRaw,
                testSuite.getByteOrder(),
                autoMigrate,
                suiteUri
            );
            if (migrated) {
                LOGGER.warn("Migrated testcase {}", testcase);
            }
            LOGGER.debug("Parsed message {}", parsedOutput);
            LOGGER.info("Parsing passed for testcase {}", testcase);

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Serialize the parsed message to a byte array
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////

            LOGGER.trace("Writing message back again");
            WriteBufferByteBased writeBuffer = new WriteBufferByteBased(parsedOutput.getLengthInBytes(), testSuite.getByteOrder());
            parsedOutput.serialize(writeBuffer);
            LOGGER.info("Serializing passed for testcase {}", testcase);
            byte[] data = writeBuffer.getBytes();
            if (testcaseRaw.length != data.length) {
                LOGGER.info("Expected a byte array with a length of {} but got one with {}", testcaseRaw.length, data.length);
            }

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Compare the serialized bytes to the initial raw array
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (!Arrays.equals(testcaseRaw, data)) {
                // This goes to std out on purpose to preserve coloring
                System.out.println(HexDiff.diffHex(testcaseRaw, data));
                throw new ParserSerializerTestsuiteException("Differences were found after serializing.\nExpected: " +
                    Hex.encodeHexString(testcaseRaw) + "\nBut Got:  " + Hex.encodeHexString(data) + "");
            }
        } catch (SerializationException | ParseException e) {
            throw new ParserSerializerTestsuiteException("Unable to parse message", e);
        }
    }
if set to true if will automigrate and on the next run test should be green
plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/parserserializer/ParserSerializerTestsuiteRunner.java