@@ -0,0 +1,1706 @@
+package uk.org.taverna.scufl2.rdfxml;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static uk.org.taverna.scufl2.rdfxml.TestRDFXMLWriter.APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.zip.ZipEntry;%0Aimport java.util.zip.ZipFile;%0A%0Aimport org.apache.commons.io.IOUtils;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport uk.org.taverna.scufl2.api.ExampleWorkflow;%0Aimport uk.org.taverna.scufl2.api.container.WorkflowBundle;%0Aimport uk.org.taverna.scufl2.api.io.WorkflowBundleIO;%0Aimport uk.org.taverna.scufl2.ucfpackage.UCFPackage;%0A%0Apublic class TestResourcesInZip %7B%0A%0A%09protected WorkflowBundleIO bundleIO = new WorkflowBundleIO();%0A%09protected ExampleWorkflow exampleWorkflow = new ExampleWorkflow();%0A%09protected WorkflowBundle originalBundle;%0A%0A%0A%09@Before%0A%09public void makeBundle() %7B%0A%09%09originalBundle = exampleWorkflow.makeWorkflowBundle();%0A%09%7D%0A%0A%09@Test%0A%09public void singleFile() throws Exception %7B%0A%09%09UCFPackage resources = originalBundle.getResources();%0A%09%09resources.addResource(%22Hello there%22, %22hello.txt%22, %22text/plain%22);%0A%09%09File bundleFile = tempFile();%0A%09%09bundleIO.writeBundle(originalBundle, bundleFile, APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE);%0A%09%09%0A%09%09ZipFile zipFile = new ZipFile(bundleFile);%0A%09%09ZipEntry hello = zipFile.getEntry(%22hello.txt%22);%0A%09%09assertEquals(%22hello.txt%22, hello.getName());%0A%09%09assertEquals(%22Hello there%22,%0A%09%09%09%09IOUtils.toString(zipFile.getInputStream(hello), %22ASCII%22));%0A%09%09%0A%09%7D%0A%09%0A%09public File tempFile() throws IOException %7B%0A%09%09File bundleFile = File.createTempFile(%22test%22, %22.scufl2%22);%0A%09%09bundleFile.deleteOnExit();%0A%09%09//System.out.println(bundleFile);%0A%09%09return bundleFile;%0A%09%7D%0A%7D%0A

Test writing of added source