@Test
    public void roundTripTest() throws IOException {
        String resourcePath = configResource();
        String resourceContent = getResourceContent(resourcePath);

        assertNotNull(resourcePath);
        assertNotNull(resourceContent);

        r.then(step -> {
            // Configure and validate
            configureWithResource(resourcePath);
            assertConfiguredAsExpected(r, resourceContent);

            // Check config is valid via Web UI
            String jenkinsConf = getResourceContent(resourcePath);
            assertConfigViaWebUI(jenkinsConf);

            // Apply configuration via Web UI
            applyConfigViaWebUI(jenkinsConf);
            assertConfiguredAsExpected(r, resourceContent);

            // Configure Jenkins default JCasC file with the config file. It's already established, we check if applied
            // looking at the logs.
            putConfigInHome(jenkinsConf);

            // Start recording the logs just before restarting, to avoid capture the previous startup. We're look there
            // if the "magic token" is there
            logging.record("io.jenkins.plugins.casc", Level.FINER).capture(2048);
        });

        r.then(step -> {
            // Verify the log shows it's configured
            assertLogAsExpected(stringInLogExpected());

            // Verify the configuration set at home/jenkins.yaml is loaded
            assertConfiguredAsExpected(r, resourceContent);
        });
    }
1. Configure the instance with the {@link #configResource()} implemented.
2. Check it was configured correctly.
3. Check the configuration is valid via Web UI.
4. Apply the configuration via Web UI.
5. Write the configuration to $JENKINS_HOME/jenkins.yaml.
6. Restart Jenkins.
7. Check the {@link #stringInLogExpected()} is set during the restart.

@throws IOException If an exception is thrown managing resources or files.
test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java