private void test() { for (TestCaseData testCase : TestCaseData.values()) { System.out.println(testCase); OutputAnalyzer oa; try { oa = ProcessTools.executeTestJvmAllArgs( "-XX:+UnlockExperimentalVMOptions", "-XX:+EnableJVMCI", "-Xbootclasspath/a:.", DebugOutputTest.Worker.class.getName(), testCase.name()); } catch (Throwable e) { e.printStackTrace(); throw new Error("Problems running child process", e); } if (testCase.expectedException != null) { oa.shouldHaveExitValue(1); oa.shouldContain(testCase.expectedException.getName()); } else { oa.shouldHaveExitValue(0); oa.shouldContain(new String(testCase.getExpected())); } } }