@@ -0,0 +1,1256 @@
+package uk.org.taverna.scufl2.rdfxml;%0A%0Aimport static org.junit.Assert.assertNotNull;%0A%0Aimport java.net.URI;%0Aimport java.net.URISyntaxException;%0Aimport java.net.URL;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport uk.org.taverna.scufl2.api.ExampleWorkflow;%0Aimport uk.org.taverna.scufl2.api.container.WorkflowBundle;%0A%0Apublic class TestProfileParser %7B%0A%09private static final String PROFILE_RDF = %22example/profile/tavernaWorkbench.rdf%22;%0A%0A%09protected ProfileParser profileParser = new ProfileParser();%0A%0A%09private URL profileUrl;%0A%0A%09private WorkflowBundle bundle;%0A%0A%09@Before%0A%09public void loadProfileDocument() %7B%0A%09%09profileUrl = getClass().getResource(PROFILE_RDF);%0A%09%09assertNotNull(%22Could not find profile document %22 + PROFILE_RDF,%0A%09%09%09%09profileUrl);%0A%09%7D%0A%0A%0A%09@Before%0A%09public void prepareParserState() throws URISyntaxException %7B%0A%09%09bundle = new ExampleWorkflow().makeWorkflowBundle();%0A%09%09bundle.getProfiles().clear();%0A%09%09bundle.setMainProfile(null);%0A%0A%09%09profileParser.getParserState().setLocation(URI.create(%22/%22));%0A%09%09profileParser.getParserState().push(bundle);%0A%09%7D%0A%0A%09@Test%0A%09public void testname() throws Exception %7B%0A%09%09profileParser.readProfile(URI.create(%22/profile/tavernaWorkbench/%22),%0A%09%09%09%09URI.create(%22profile/tavernaWorkbench.rdf%22),%0A%09%09%09%09profileUrl.openStream());%0A%09%7D%0A%7D%0A

Test ProfileParser independently (by cheating on parserState)