@Test
    void exported_packages_are_not_changed_unintentionally() throws Exception {
        Properties actualProperties = getPropertiesFromFile(createPropertiesFile());
        String actualValue = actualProperties.getProperty(ExportPackages.EXPORT_PACKAGES);
        assertNotNull(actualValue, "Missing exportPackages property in file.");

        Properties expectedProperties = getPropertiesFromFile(expectedExportPackages);
        String expectedValue = expectedProperties.getProperty(ExportPackages.EXPORT_PACKAGES);
        assertNotNull(expectedValue, "Missing exportPackages property in file.");

        var expectedPackages = parsePackages(expectedValue).removeJavaVersion();
        if (Runtime.version().feature() >= 21) {
            expectedPackages = expectedPackages.removePackages(removedPackagesInJava21)
                    .addPackages(newPackagesInJava21);
        }
        var actualPackages = parsePackages(actualValue).removeJavaVersion();

        if (!actualPackages.isEquivalentTo(expectedPackages)) {
            StringBuilder message = getDiff(actualPackages, expectedPackages);
            message.append("\n\nIf this test fails due to an intentional change in exported packages, run the following command:\n")
                    .append("$ cp jdisc_core/target/classes/exportPackages.properties jdisc_core/src/test/resources/")
                    .append("\n\nNote that removing exported packages usually requires a new major version of Vespa.\n");
            fail(message.toString());
        }
        // TODO: check that actualValue equals expectedValue. Problem is that exportPackages.properties is non-deterministic.
    }
Integration tests for {@link ExportPackages}.

@author gjoranv
jdisc_core/src/test/java/com/yahoo/jdisc/core/ExportPackagesIT.java