@@ -0,0 +1,1443 @@
+package javaposse.jobdsl.plugin;%0A%0Aimport hudson.model.FreeStyleBuild;%0Aimport hudson.model.FreeStyleProject;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.jvnet.hudson.test.JenkinsRule;%0A%0Aimport static hudson.model.Result.SUCCESS;%0Aimport static javaposse.jobdsl.plugin.RemovedJobAction.IGNORE;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class ContextIntegrationTest %7B%0A    @Rule%0A    public JenkinsRule jenkinsRule = new JenkinsRule();%0A%0A    @Test%0A    public void testAllowEmptyArchive() throws Exception %7B%0A        String emptyArchiveScript = %22%22 +%0A                %22job %7B%5Cn%22 +%0A                %22  name('test-job')%5Cn%22 +%0A                %22  steps %7B%5Cn%22 +%0A                %22    shell(%5C%22echo 'foo' %3E test%5C%22)%5Cn%22 +%0A                %22  %7D%5Cn%22 +%0A                %22  publishers %7B%5Cn%22 +%0A                %22    archiveArtifacts('test*')%5Cn%22 +%0A                %22  %7D%5Cn%22 +%0A                %22%7D%22;%0A%0A        // setup%0A        FreeStyleProject job = jenkinsRule.createFreeStyleProject(%22seed%22);%0A        job.getBuildersList().add(new ExecuteDslScripts(new ExecuteDslScripts.ScriptLocation(%22true%22,%0A                null, emptyArchiveScript), true, IGNORE));%0A%0A        // when%0A        FreeStyleBuild freeStyleBuild = job.scheduleBuild2(0).get();%0A%0A        // then%0A        assertEquals(SUCCESS, freeStyleBuild.getResult());%0A        assertTrue(jenkinsRule.getInstance().getItem(%22test-job%22) instanceof FreeStyleProject);%0A    %7D%0A%7D%0A

Add ContextIntegrationTest, courtesy of @abayer