@Test public void configRoundTrip() throws Exception { SnippetizerTester st = new SnippetizerTester(rule); JUnitResultsStep step = new JUnitResultsStep("**/target/surefire-reports/TEST-*.xml"); st.assertRoundTrip(step, "junit '**/target/surefire-reports/TEST-*.xml'"); step.setAllowEmptyResults(true); st.assertRoundTrip(step, "junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'"); step.setHealthScaleFactor(2.0); st.assertRoundTrip(step, "junit allowEmptyResults: true, healthScaleFactor: 2.0, testResults: '**/target/surefire-reports/TEST-*.xml'"); MockTestDataPublisher publisher = new MockTestDataPublisher("testing"); step.setTestDataPublishers(Collections.<TestDataPublisher>singletonList(publisher)); st.assertRoundTrip(step, "junit allowEmptyResults: true, healthScaleFactor: 2.0, testDataPublishers: [[$class: 'MockTestDataPublisher', name: 'testing']], testResults: '**/target/surefire-reports/TEST-*.xml'"); }