@Test
    public void runnerCanBeReused() throws InterruptedException, IOException {
        TestRunner runner = new TestRunner(artifactsPath, testPath, configFile, settingsFile,
                                           __ -> new ProcessBuilder("sleep", "0.1"));
        runner.test(SYSTEM_TEST, "config".getBytes());
        assertEquals(TestRunner.Status.RUNNING, runner.getStatus());

        while (runner.getStatus() == TestRunner.Status.RUNNING) {
            Thread.sleep(10);
        }
        assertEquals(1, runner.getLog(-1).size());
        assertEquals(TestRunner.Status.SUCCESS, runner.getStatus());

        runner.test(STAGING_TEST, "newConfig".getBytes());
        while (runner.getStatus() == TestRunner.Status.RUNNING) {
            Thread.sleep(10);
        }

        assertEquals("newConfig", new String(Files.readAllBytes(configFile)));
        assertEquals(1, runner.getLog(-1).size());
    }
Unit tests relying on a UNIX shell >_<

@author jvenstad
vespa-testrunner-components/src/test/java/com/yahoo/vespa/hosted/testrunner/TestRunnerTest.java