You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/17 21:40:01 UTC

[10/51] [partial] incubator-taverna-language git commit: temporarily empty repository

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/316e4a8a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestRESTActivityParser.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestRESTActivityParser.java b/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestRESTActivityParser.java
deleted file mode 100644
index b7d28d2..0000000
--- a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestRESTActivityParser.java
+++ /dev/null
@@ -1,1046 +0,0 @@
-package org.apache.taverna.scufl2.translator.t2flow.t23activities;
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-import static org.apache.taverna.scufl2.translator.t2flow.t23activities.RESTActivityParser.ACTIVITY_URI;
-import static org.apache.taverna.scufl2.translator.t2flow.t23activities.RESTActivityParser.HTTP_METHODS_URI;
-import static org.apache.taverna.scufl2.translator.t2flow.t23activities.RESTActivityParser.HTTP_URI;
-import static org.junit.Assert.*;
-
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBException;
-
-import org.apache.taverna.scufl2.api.activity.Activity;
-import org.apache.taverna.scufl2.api.common.Scufl2Tools;
-import org.apache.taverna.scufl2.api.common.URITools;
-import org.apache.taverna.scufl2.api.configurations.Configuration;
-import org.apache.taverna.scufl2.api.container.WorkflowBundle;
-import org.apache.taverna.scufl2.api.core.Processor;
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-import org.apache.taverna.scufl2.api.profiles.Profile;
-import org.apache.taverna.scufl2.translator.t2flow.T2FlowParser;
-import org.apache.taverna.scufl2.translator.t2flow.T2Parser;
-import org.apache.taverna.scufl2.translator.t2flow.t23activities.RESTActivityParser;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-
-@SuppressWarnings("unused")
-public class TestRESTActivityParser {
-
-	private static Scufl2Tools scufl2Tools = new Scufl2Tools();
-	private static URITools uriTools = new URITools();
-	private static final String WF_2_2 = "/rest-2-2.t2flow";
-	private static final String WF_2_2_SAVED_2_3 = "/rest-2-2-saved-2-3.t2flow";
-
-	private static final String WF_2_3 = "/rest-2-3.t2flow";
-
-
-	private void checkT2Parsers(T2FlowParser parser) {
-		for (T2Parser t2Parser : parser.getT2Parsers()) {
-			if (t2Parser instanceof RESTActivityParser) {
-				return;
-			}
-		}
-		fail("Could not find REST activity parser, found " + parser.getT2Parsers());
-	}
-/* TODO: Update test to use JSON config
-	@Test
-	public void default_2_2_saved() throws Exception {
-		WorkflowBundle bundle_2_2_saved = parse2_2_saved_2_3();
-		Profile profile = bundle_2_2_saved.getMainProfile();
-		//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-		// [default, post, put]
-		Processor proc = bundle_2_2_saved.getMainWorkflow().getProcessors()
-				.getByName("default");
-		assertNotNull(proc);
-		Configuration config = scufl2Tools
-				.configurationForActivityBoundToProcessor(proc, profile);
-		assertNotNull(config);
-		assertEquals(ACTIVITY_URI.resolve("#Config"),
-				config.getType());
-
-		Activity activity = (Activity) config.getConfigures();
-		assertEquals(ACTIVITY_URI, activity.getType());
-
-		ObjectNode configResource = config.getJsonAsObjectNode();
-		ObjectNode request = configResource.get("request");
-
-		URI toolId = request.getPropertyAsResourceURI(
-				HTTP_URI.resolve("#mthd"));
-		assertEquals(HTTP_METHODS_URI.resolve("#GET"),
-				toolId);
-
-		String urlSignature = request.getPropertyAsString(
-				ACTIVITY_URI.resolve("#absoluteURITemplate"));
-		assertEquals("http://www.myexperiment.org/user.xml?id={userID}", urlSignature);
-
-		Map<String, String> foundHeaders = new HashMap<String, String>();
-		PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-		for (PropertyObject header : headers) {
-			PropertyResource reqHeader = (PropertyResource) header;
-			String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-			String value;
-			if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-				value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-			} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-				assertEquals(true,
-						reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-				value = "--use100Continue--";
-			} else {
-				value = "--undefinedValue--";
-			}
-			foundHeaders.put(fieldName, value);
-			assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-		}
-		assertEquals(1, foundHeaders.size());
-		assertEquals("text/plain", foundHeaders.get("Accept"));
-		// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-		assertFalse(foundHeaders.containsKey("Content-Type"));
-		assertFalse(foundHeaders.containsKey("Expect"));
-		//assertEquals("application/zip", foundHeaders.get("Content-Type"));
-		// assertEquals("--use100Continue--", foundHeaders.get("Expect"))
-
-
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-		//assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-		//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-		// Check ports
-//		assertEquals(1, activity.getInputPorts().size());
-//		InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//		assertEquals((Integer)0, userID.getDepth());
-//
-//		assertEquals(2, activity.getOutputPorts().size());
-//		OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//		assertEquals((Integer)0, responseBody.getDepth());
-//
-//		OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//		assertEquals((Integer)0, status.getDepth());
-//
-//		PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-	}
-
-	@Test
-	public void default2_2() throws Exception {
-		WorkflowBundle bundle_2_2 = parse2_2();
-		Profile profile = bundle_2_2.getMainProfile();
-		//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-		// [default, post, put]
-		Processor proc = bundle_2_2.getMainWorkflow().getProcessors()
-				.getByName("default");
-		assertNotNull(proc);
-		Configuration config = scufl2Tools
-				.configurationForActivityBoundToProcessor(proc, profile);
-		assertNotNull(config);
-		assertEquals(ACTIVITY_URI.resolve("#Config"),
-				config.getType());
-
-		Activity activity = (Activity) config.getConfigures();
-		assertEquals(ACTIVITY_URI, activity.getType());
-
-		PropertyResource configResource = config.getJson();
-		PropertyResource request = configResource.getPropertyAsResource(
-				ACTIVITY_URI.resolve("#request"));
-		assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-		// A sub-class of HTTP_URI.resolve("#Request")
-
-		URI toolId = request.getPropertyAsResourceURI(
-				HTTP_URI.resolve("#mthd"));
-		assertEquals(HTTP_METHODS_URI.resolve("#GET"),
-				toolId);
-
-		String urlSignature = request.getPropertyAsString(
-				ACTIVITY_URI.resolve("#absoluteURITemplate"));
-		assertEquals("http://www.myexperiment.org/user.xml?id={userID}", urlSignature);
-
-		Map<String, String> foundHeaders = new HashMap<String, String>();
-		PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-		for (PropertyObject header : headers) {
-			PropertyResource reqHeader = (PropertyResource) header;
-			String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-			String value;
-			if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-				value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-			} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-				assertEquals(true,
-						reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-				value = "--use100Continue--";
-			} else {
-				value = "--undefinedValue--";
-			}
-			foundHeaders.put(fieldName, value);
-			assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-		}
-		assertEquals(1, foundHeaders.size());
-		assertEquals("text/plain", foundHeaders.get("Accept"));
-		// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-		assertFalse(foundHeaders.containsKey("Content-Type"));
-		assertFalse(foundHeaders.containsKey("Expect"));
-		//assertEquals("application/zip", foundHeaders.get("Content-Type"));
-		// assertEquals("--use100Continue--", foundHeaders.get("Expect"))
-
-
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-		//assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-		//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-		// Check ports
-//		assertEquals(1, activity.getInputPorts().size());
-//		InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//		assertEquals((Integer)0, userID.getDepth());
-//
-//		assertEquals(2, activity.getOutputPorts().size());
-//		OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//		assertEquals((Integer)0, responseBody.getDepth());
-//
-//		OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//		assertEquals((Integer)0, status.getDepth());
-//
-//		PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-	}
-
-	@Test
-	public void default2_3() throws Exception {
-		WorkflowBundle bundle_2_3 = parse2_3();
-		Profile profile = bundle_2_3.getMainProfile();
-		//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-		// [default, post, put]
-		Processor proc = bundle_2_3.getMainWorkflow().getProcessors()
-				.getByName("default");
-		assertNotNull(proc);
-		Configuration config = scufl2Tools
-				.configurationForActivityBoundToProcessor(proc, profile);
-		assertNotNull(config);
-		assertEquals(ACTIVITY_URI.resolve("#Config"),
-				config.getType());
-
-		Activity activity = (Activity) config.getConfigures();
-		assertEquals(ACTIVITY_URI, activity.getType());
-
-		PropertyResource configResource = config.getJson();
-		PropertyResource request = configResource.getPropertyAsResource(
-				ACTIVITY_URI.resolve("#request"));
-		assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-		// A sub-class of HTTP_URI.resolve("#Request")
-
-		URI toolId = request.getPropertyAsResourceURI(
-				HTTP_URI.resolve("#mthd"));
-		assertEquals(HTTP_METHODS_URI.resolve("#GET"),
-				toolId);
-
-		String urlSignature = request.getPropertyAsString(
-				ACTIVITY_URI.resolve("#absoluteURITemplate"));
-		assertEquals("http://www.uniprot.org/uniprot/{id}.xml", urlSignature);
-
-		Map<String, String> foundHeaders = new HashMap<String, String>();
-		PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-		for (PropertyObject header : headers) {
-			PropertyResource reqHeader = (PropertyResource) header;
-			String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-			String value;
-			if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-				value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-			} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-				assertEquals(true,
-						reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-				value = "--use100Continue--";
-			} else {
-				value = "--undefinedValue--";
-			}
-			foundHeaders.put(fieldName, value);
-			assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-		}
-		assertEquals(1, foundHeaders.size());
-		assertEquals("application/xml", foundHeaders.get("Accept"));
-		// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-		assertFalse(foundHeaders.containsKey("Content-Type"));
-		assertFalse(foundHeaders.containsKey("Expect"));
-		//assertEquals("application/zip", foundHeaders.get("Content-Type"));
-		// assertEquals("--use100Continue--", foundHeaders.get("Expect"))
-
-
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-		//assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-		//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-		// Check ports
-//		assertEquals(1, activity.getInputPorts().size());
-//		InputActivityPort id = activity.getInputPorts().getByName("id");
-//		assertEquals((Integer)0, id.getDepth());
-//
-//		assertEquals(2, activity.getOutputPorts().size());
-//		OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//		assertEquals((Integer)0, responseBody.getDepth());
-//
-//		OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//		assertEquals((Integer)0, status.getDepth());
-//
-//		PropertyResource idDef = scufl2Tools.portDefinitionFor(id, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), idDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				idDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-	}
-
-	public T2FlowParser makeParser() throws JAXBException {
-		T2FlowParser parser = new T2FlowParser();
-		parser.setValidating(true);
-		parser.setStrict(true);
-		checkT2Parsers(parser);
-		return parser;
-	}
-
-	 Move to integration test with higher thread counts 
-	@Test
-	public void multiThreadParse() throws Exception {
-
-		final boolean LOG = false;
-		final int NUM_THREADS=6;
-
-		final T2FlowParser parser = makeParser();
-		final URL wf_2_2 = getClass().getResource(WF_2_2);
-		final URL wf_2_2_saved = getClass().getResource(WF_2_2_SAVED_2_3);
-		final URL wf_2_3 = getClass().getResource(WF_2_3);
-
-
-		List<Thread> threads = new ArrayList<Thread>();
-		for (int i=0; i<NUM_THREADS; i++) {
-			threads.add(
-			new Thread(
-					new Runnable() {
-				@Override
-				public void run() {
-					try {
-						if (LOG)
-							System.out.print(".");
-						parser.parseT2Flow(wf_2_2.openStream());
-						if (LOG)
-							System.out.print("ยท");
-						parser.parseT2Flow(wf_2_2_saved.openStream());
-						if (LOG)
-							System.out.print(":");
-						parser.parseT2Flow(wf_2_3.openStream());
-						if (LOG)
-							System.out.print("'");
-					} catch (Exception e) {
-						throw new RuntimeException("", e);
-					}
-				}
-			}));
-		}
-		Date started = new Date();
-		final List<Throwable> errors = new ArrayList<Throwable>();
-		for (Thread t : threads) {
-			if (LOG) System.out.print("+");
-			t.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
-				@Override
-				public void uncaughtException(Thread t, Throwable e) {
-					e.printStackTrace();
-					errors.add(e);
-				}
-			});
-			t.start();
-		}
-		if (LOG) System.out.print("\n");
-		for (Thread t : threads) {
-			t.join();
-			if (LOG) System.out.print("-");
-		}
-		Date finished = new Date();
-		if (LOG) System.out.print("\n" + (finished.getTime() - started.getTime()) + " ms");
-		assertTrue(errors.size() + " errors occured", errors.isEmpty());
-	}
-
-	public WorkflowBundle parse2_2() throws Exception {
-		T2FlowParser parser = makeParser();
-		URL wfResource = getClass().getResource(WF_2_2);
-		assertNotNull("Could not find workflow " + WF_2_2, wfResource);
-		return parser
-				.parseT2Flow(wfResource.openStream());
-	}
-
-
-	public WorkflowBundle parse2_2_saved_2_3() throws Exception {
-		T2FlowParser parser = makeParser();
-		URL wfResource = getClass().getResource(WF_2_2_SAVED_2_3);
-		assertNotNull("Could not find workflow " + WF_2_2_SAVED_2_3, wfResource);
-		return parser
-				.parseT2Flow(wfResource.openStream());
-	}
-
-	public WorkflowBundle parse2_3() throws Exception {
-		T2FlowParser parser = makeParser();
-		URL wfResource = getClass().getResource(WF_2_3);
-		assertNotNull("Could not find workflow " + WF_2_3, wfResource);
-		return parser
-				.parseT2Flow(wfResource.openStream());
-	}
-
-
-
-
-
-	@Test
-	public void put2_2() throws Exception {
-		WorkflowBundle bundle_2_2 = parse2_2();
-		Profile profile = bundle_2_2.getMainProfile();
-		//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-		// [default, post, put]
-		Processor proc = bundle_2_2.getMainWorkflow().getProcessors()
-				.getByName("put");
-		assertNotNull(proc);
-		Configuration config = scufl2Tools
-				.configurationForActivityBoundToProcessor(proc, profile);
-		assertNotNull(config);
-		assertEquals(ACTIVITY_URI.resolve("#Config"),
-				config.getType());
-
-		Activity activity = (Activity) config.getConfigures();
-		assertEquals(ACTIVITY_URI, activity.getType());
-
-		PropertyResource configResource = config.getJson();
-		PropertyResource request = configResource.getPropertyAsResource(
-				ACTIVITY_URI.resolve("#request"));
-		assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-		// A sub-class of HTTP_URI.resolve("#Request")
-
-		URI toolId = request.getPropertyAsResourceURI(
-				HTTP_URI.resolve("#mthd"));
-		assertEquals(HTTP_METHODS_URI.resolve("#PUT"),
-				toolId);
-
-		String urlSignature = request.getPropertyAsString(
-				ACTIVITY_URI.resolve("#absoluteURITemplate"));
-		assertEquals("http://example.com/{thing}/user.xml?id={userID}", urlSignature);
-
-		Map<String, String> foundHeaders = new HashMap<String, String>();
-		PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-		for (PropertyObject header : headers) {
-			PropertyResource reqHeader = (PropertyResource) header;
-			String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-			String value;
-			if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-				value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-			} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-				assertEquals(true,
-						reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-				value = "--use100Continue--";
-			} else {
-				value = "--undefinedValue--";
-			}
-			foundHeaders.put(fieldName, value);
-			assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-		}
-		assertEquals(3, foundHeaders.size());
-
-		assertEquals("application/xml", foundHeaders.get("Accept"));
-		// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-//		assertFalse(foundHeaders.containsKey("Content-Type"));
-//		assertFalse(foundHeaders.containsKey("Expect"));
-		assertEquals("application/json", foundHeaders.get("Content-Type"));
-		 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-
-
-//		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-		assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-		//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-		// Check ports
-//		assertEquals(3, activity.getInputPorts().size());
-//		InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//		assertEquals((Integer)0, userID.getDepth());
-//
-//		InputActivityPort thing = activity.getInputPorts().getByName("thing");
-//		assertEquals((Integer)0, thing.getDepth());
-//
-//		InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//		assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//		assertEquals(3, activity.getOutputPorts().size());
-//		OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//		assertEquals((Integer)0, responseBody.getDepth());
-//
-//		OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//		assertEquals((Integer)0, status.getDepth());
-//
-//		OutputActivityPort redirection = activity.getOutputPorts().getByName("redirection");
-//		assertEquals((Integer)0, redirection.getDepth());
-//
-//
-//		PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//		PropertyResource thingDef = scufl2Tools.portDefinitionFor(thing, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), thingDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				thingDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//		PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//		assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//		assertEquals(PropertyLiteral.XSD_STRING,
-//				inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-	}
-
-	@Test
-		public void put2_2_resaved() throws Exception {
-			WorkflowBundle bundle = parse2_2_saved_2_3();
-			Profile profile = bundle.getMainProfile();
-			//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-			// [default, post, put]
-			Processor proc = bundle.getMainWorkflow().getProcessors()
-					.getByName("put");
-			assertNotNull(proc);
-			Configuration config = scufl2Tools
-					.configurationForActivityBoundToProcessor(proc, profile);
-			assertNotNull(config);
-			assertEquals(ACTIVITY_URI.resolve("#Config"),
-					config.getType());
-
-			Activity activity = (Activity) config.getConfigures();
-			assertEquals(ACTIVITY_URI, activity.getType());
-
-			PropertyResource configResource = config.getJson();
-			PropertyResource request = configResource.getPropertyAsResource(
-					ACTIVITY_URI.resolve("#request"));
-			assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-			// A sub-class of HTTP_URI.resolve("#Request")
-
-			URI toolId = request.getPropertyAsResourceURI(
-					HTTP_URI.resolve("#mthd"));
-			assertEquals(HTTP_METHODS_URI.resolve("#PUT"),
-					toolId);
-
-			String urlSignature = request.getPropertyAsString(
-					ACTIVITY_URI.resolve("#absoluteURITemplate"));
-			assertEquals("http://example.com/{thing}/user.xml?id={userID}", urlSignature);
-
-			Map<String, String> foundHeaders = new HashMap<String, String>();
-			PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-			for (PropertyObject header : headers) {
-				PropertyResource reqHeader = (PropertyResource) header;
-				String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-				String value;
-				if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-					value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-				} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-					assertEquals(true,
-							reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-					value = "--use100Continue--";
-				} else {
-					value = "--undefinedValue--";
-				}
-				foundHeaders.put(fieldName, value);
-				assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-			}
-			assertEquals(3, foundHeaders.size());
-
-			assertEquals("application/xml", foundHeaders.get("Accept"));
-			// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-	//		assertFalse(foundHeaders.containsKey("Content-Type"));
-	//		assertFalse(foundHeaders.containsKey("Expect"));
-			assertEquals("application/json", foundHeaders.get("Content-Type"));
-			 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-
-
-	//		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-			assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-			//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-			assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-			// Check ports
-//			assertEquals(3, activity.getInputPorts().size());
-//			InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//			assertEquals((Integer)0, userID.getDepth());
-//
-//			InputActivityPort thing = activity.getInputPorts().getByName("thing");
-//			assertEquals((Integer)0, thing.getDepth());
-//
-//			InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//			assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//			assertEquals(3, activity.getOutputPorts().size());
-//			OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//			assertEquals((Integer)0, responseBody.getDepth());
-//
-//			OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//			assertEquals((Integer)0, status.getDepth());
-//
-//			OutputActivityPort redirection = activity.getOutputPorts().getByName("redirection");
-//			assertEquals((Integer)0, redirection.getDepth());
-//
-//
-//			PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//			PropertyResource thingDef = scufl2Tools.portDefinitionFor(thing, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), thingDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					thingDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//			PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-		}
-
-	@Test
-		public void put2_3() throws Exception {
-			WorkflowBundle bundle = parse2_3();
-			Profile profile = bundle.getMainProfile();
-			//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-			// [default, post, put]
-			Processor proc = bundle.getMainWorkflow().getProcessors()
-					.getByName("put");
-			assertNotNull(proc);
-			Configuration config = scufl2Tools
-					.configurationForActivityBoundToProcessor(proc, profile);
-			assertNotNull(config);
-			assertEquals(ACTIVITY_URI.resolve("#Config"),
-					config.getType());
-
-			Activity activity = (Activity) config.getConfigures();
-			assertEquals(ACTIVITY_URI, activity.getType());
-
-			PropertyResource configResource = config.getJson();
-			PropertyResource request = configResource.getPropertyAsResource(
-					ACTIVITY_URI.resolve("#request"));
-			assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-			// A sub-class of HTTP_URI.resolve("#Request")
-
-			URI toolId = request.getPropertyAsResourceURI(
-					HTTP_URI.resolve("#mthd"));
-			assertEquals(HTTP_METHODS_URI.resolve("#PUT"),
-					toolId);
-
-			String urlSignature = request.getPropertyAsString(
-					ACTIVITY_URI.resolve("#absoluteURITemplate"));
-			assertEquals("http://www.uniprot.org/{db}/{id}.xml", urlSignature);
-
-			Map<String, String> foundHeaders = new HashMap<String, String>();
-			PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-			for (PropertyObject header : headers) {
-				PropertyResource reqHeader = (PropertyResource) header;
-				String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-				String value;
-				if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-					value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-				} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-					assertEquals(true,
-							reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-					value = "--use100Continue--";
-				} else {
-					value = "--undefinedValue--";
-				}
-				foundHeaders.put(fieldName, value);
-				assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-			}
-			assertEquals(5, foundHeaders.size());
-
-			assertEquals("audio/mp4", foundHeaders.get("Accept"));
-			// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-	//		assertFalse(foundHeaders.containsKey("Content-Type"));
-	//		assertFalse(foundHeaders.containsKey("Expect"));
-			assertEquals("application/xml", foundHeaders.get("Content-Type"));
-			 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-			 assertEquals("Soup", foundHeaders.get("X-Fish"));
-			 assertEquals("Very funny", foundHeaders.get("X-Taverna"));
-
-
-	//		assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-			assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-			//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-			assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-			// Check ports
-//			assertEquals(3, activity.getInputPorts().size());
-//			InputActivityPort db = activity.getInputPorts().getByName("db");
-//			assertEquals((Integer)0, db.getDepth());
-//
-//			InputActivityPort id = activity.getInputPorts().getByName("id");
-//			assertEquals((Integer)0, id.getDepth());
-//
-//			InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//			assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//			assertEquals(3, activity.getOutputPorts().size());
-//			OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//			assertEquals((Integer)0, responseBody.getDepth());
-//
-//			OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//			assertEquals((Integer)0, status.getDepth());
-//
-//			OutputActivityPort redirection = activity.getOutputPorts().getByName("redirection");
-//			assertEquals((Integer)0, redirection.getDepth());
-//
-//
-//			PropertyResource dbDef = scufl2Tools.portDefinitionFor(db, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), dbDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					dbDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//			PropertyResource idDef = scufl2Tools.portDefinitionFor(id, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), idDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					idDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//			PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-		}
-
-	@Test
-		public void post2_2() throws Exception {
-			WorkflowBundle bundle = parse2_2();
-			Profile profile = bundle.getMainProfile();
-			//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-			// [default, post, put]
-			Processor proc = bundle.getMainWorkflow().getProcessors()
-					.getByName("post");
-			assertNotNull(proc);
-			Configuration config = scufl2Tools
-					.configurationForActivityBoundToProcessor(proc, profile);
-			assertNotNull(config);
-			assertEquals(ACTIVITY_URI.resolve("#Config"),
-					config.getType());
-
-			Activity activity = (Activity) config.getConfigures();
-			assertEquals(ACTIVITY_URI, activity.getType());
-
-			PropertyResource configResource = config.getJson();
-			PropertyResource request = configResource.getPropertyAsResource(
-					ACTIVITY_URI.resolve("#request"));
-			assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-			// A sub-class of HTTP_URI.resolve("#Request")
-
-			URI toolId = request.getPropertyAsResourceURI(
-					HTTP_URI.resolve("#mthd"));
-			assertEquals(HTTP_METHODS_URI.resolve("#POST"),
-					toolId);
-
-			String urlSignature = request.getPropertyAsString(
-					ACTIVITY_URI.resolve("#absoluteURITemplate"));
-			assertEquals("http://www.myexperiment.org/user.xml?id={userID}", urlSignature);
-
-			Map<String, String> foundHeaders = new HashMap<String, String>();
-			PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-			for (PropertyObject header : headers) {
-				PropertyResource reqHeader = (PropertyResource) header;
-				String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-				String value;
-				if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-					value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-				} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-					assertEquals(true,
-							reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-					value = "--use100Continue--";
-				} else {
-					value = "--undefinedValue--";
-				}
-				foundHeaders.put(fieldName, value);
-				assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-			}
-			assertEquals(2, foundHeaders.size());
-
-			assertEquals("text/plain", foundHeaders.get("Accept"));
-			// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-	//		assertFalse(foundHeaders.containsKey("Content-Type"));
-			assertFalse(foundHeaders.containsKey("Expect"));
-			assertEquals("application/zip", foundHeaders.get("Content-Type"));
-//			 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-
-
-			assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-//			assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-			//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-			assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-			// Check ports
-//			assertEquals(2, activity.getInputPorts().size());
-//			InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//			assertEquals((Integer)0, userID.getDepth());
-//
-//			InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//			assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//			assertEquals(2, activity.getOutputPorts().size());
-//			OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//			assertEquals((Integer)0, responseBody.getDepth());
-//
-//			OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//			assertEquals((Integer)0, status.getDepth());
-//
-//
-//			PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//			assertEquals(PropertyLiteral.XSD_STRING,
-//					userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//			PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//			assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#binary"),
-//					inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-		}
-
-	@Test
-			public void post2_2_saved_2_3() throws Exception {
-				WorkflowBundle bundle = parse2_2_saved_2_3();
-				Profile profile = bundle.getMainProfile();
-				//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-				// [default, post, put]
-				Processor proc = bundle.getMainWorkflow().getProcessors()
-						.getByName("post");
-				assertNotNull(proc);
-				Configuration config = scufl2Tools
-						.configurationForActivityBoundToProcessor(proc, profile);
-				assertNotNull(config);
-				assertEquals(ACTIVITY_URI.resolve("#Config"),
-						config.getType());
-
-				Activity activity = (Activity) config.getConfigures();
-				assertEquals(ACTIVITY_URI, activity.getType());
-
-				PropertyResource configResource = config.getJson();
-				PropertyResource request = configResource.getPropertyAsResource(
-						ACTIVITY_URI.resolve("#request"));
-				assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-				// A sub-class of HTTP_URI.resolve("#Request")
-
-				URI toolId = request.getPropertyAsResourceURI(
-						HTTP_URI.resolve("#mthd"));
-				assertEquals(HTTP_METHODS_URI.resolve("#POST"),
-						toolId);
-
-				String urlSignature = request.getPropertyAsString(
-						ACTIVITY_URI.resolve("#absoluteURITemplate"));
-				assertEquals("http://www.myexperiment.org/user.xml?id={userID}", urlSignature);
-
-				Map<String, String> foundHeaders = new HashMap<String, String>();
-				PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-				for (PropertyObject header : headers) {
-					PropertyResource reqHeader = (PropertyResource) header;
-					String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-					String value;
-					if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-						value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-					} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-						assertEquals(true,
-								reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-						value = "--use100Continue--";
-					} else {
-						value = "--undefinedValue--";
-					}
-					foundHeaders.put(fieldName, value);
-					assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-				}
-				assertEquals(2, foundHeaders.size());
-
-				assertEquals("text/plain", foundHeaders.get("Accept"));
-				// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-		//		assertFalse(foundHeaders.containsKey("Content-Type"));
-				assertFalse(foundHeaders.containsKey("Expect"));
-				assertEquals("application/zip", foundHeaders.get("Content-Type"));
-	//			 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-
-
-				assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-	//			assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-				//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-				assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-				// Check ports
-//				assertEquals(2, activity.getInputPorts().size());
-//				InputActivityPort userID = activity.getInputPorts().getByName("userID");
-//				assertEquals((Integer)0, userID.getDepth());
-//
-//				InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//				assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//				assertEquals(2, activity.getOutputPorts().size());
-//				OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//				assertEquals((Integer)0, responseBody.getDepth());
-//
-//				OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//				assertEquals((Integer)0, status.getDepth());
-//
-//
-//				PropertyResource userIDDef = scufl2Tools.portDefinitionFor(userID, profile);
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), userIDDef.getTypeURI());
-//				assertEquals(PropertyLiteral.XSD_STRING,
-//						userIDDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//				PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#binary"),
-//						inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-			}
-
-	@Test
-			public void post2_3() throws Exception {
-				WorkflowBundle bundle = parse2_3();
-				Profile profile = bundle.getMainProfile();
-				//System.out.println(bundle.getMainWorkflow().getProcessors().getNames());
-				// [default, post, put]
-				Processor proc = bundle.getMainWorkflow().getProcessors()
-						.getByName("post");
-				assertNotNull(proc);
-				Configuration config = scufl2Tools
-						.configurationForActivityBoundToProcessor(proc, profile);
-				assertNotNull(config);
-				assertEquals(ACTIVITY_URI.resolve("#Config"),
-						config.getType());
-
-				Activity activity = (Activity) config.getConfigures();
-				assertEquals(ACTIVITY_URI, activity.getType());
-
-				PropertyResource configResource = config.getJson();
-				PropertyResource request = configResource.getPropertyAsResource(
-						ACTIVITY_URI.resolve("#request"));
-				assertEquals(ACTIVITY_URI.resolve("#Request"), request.getTypeURI());
-				// A sub-class of HTTP_URI.resolve("#Request")
-
-				URI toolId = request.getPropertyAsResourceURI(
-						HTTP_URI.resolve("#mthd"));
-				assertEquals(HTTP_METHODS_URI.resolve("#POST"),
-						toolId);
-
-				String urlSignature = request.getPropertyAsString(
-						ACTIVITY_URI.resolve("#absoluteURITemplate"));
-				assertEquals("http://www.uniprot.org/uniprot/{id}.xml", urlSignature);
-
-				Map<String, String> foundHeaders = new HashMap<String, String>();
-				PropertyList headers = request.getPropertyAsList(HTTP_URI.resolve("#headers"));
-				for (PropertyObject header : headers) {
-					PropertyResource reqHeader = (PropertyResource) header;
-					String fieldName = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldName"));
-					String value;
-					if (reqHeader.hasProperty(HTTP_URI.resolve("#fieldValue"))) {
-						value = reqHeader.getPropertyAsString(HTTP_URI.resolve("#fieldValue"));
-					} else if (reqHeader.hasProperty(ACTIVITY_URI.resolve("#use100Continue"))) {
-						assertEquals(true,
-								reqHeader.getPropertyAsLiteral(ACTIVITY_URI.resolve("#use100Continue")).getLiteralValueAsBoolean());
-						value = "--use100Continue--";
-					} else {
-						value = "--undefinedValue--";
-					}
-					foundHeaders.put(fieldName, value);
-					assertEquals(HTTP_URI.resolve("#RequestHeader"), reqHeader.getTypeURI());
-				}
-				assertEquals(2, foundHeaders.size());
-
-				assertEquals("application/xml", foundHeaders.get("Accept"));
-				// Content-Type and Expect should *not* be included if the method is GET/HEAD/DELETE
-		//		assertFalse(foundHeaders.containsKey("Content-Type"));
-				assertFalse(foundHeaders.containsKey("Expect"));
-				assertEquals("application/zip", foundHeaders.get("Content-Type"));
-	//			 assertEquals("--use100Continue--", foundHeaders.get("Expect"));
-
-
-				assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#showRedirectionOutputPort")));
-	//			assertTrue(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#showRedirectionOutputPort")).getLiteralValueAsBoolean());
-				//assertFalse(configResource.getPropertyAsLiteral(ACTIVITY_URI.resolve("#escapeParameters")).getLiteralValueAsBoolean());
-				assertFalse(configResource.hasProperty(ACTIVITY_URI.resolve("#escapeParameters")));
-
-
-				// Check ports
-//				assertEquals(2, activity.getInputPorts().size());
-//				InputActivityPort id = activity.getInputPorts().getByName("id");
-//				assertEquals((Integer)0, id.getDepth());
-//
-//				InputActivityPort inputBody = activity.getInputPorts().getByName("inputBody");
-//				assertEquals((Integer)0, inputBody.getDepth());
-//
-//
-//				assertEquals(2, activity.getOutputPorts().size());
-//				OutputActivityPort responseBody = activity.getOutputPorts().getByName("responseBody");
-//				assertEquals((Integer)0, responseBody.getDepth());
-//
-//				OutputActivityPort status = activity.getOutputPorts().getByName("status");
-//				assertEquals((Integer)0, status.getDepth());
-//
-//
-//				PropertyResource idDef = scufl2Tools.portDefinitionFor(id, profile);
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), idDef.getTypeURI());
-//				assertEquals(PropertyLiteral.XSD_STRING,
-//						idDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-//
-//				PropertyResource inputBodyDef = scufl2Tools.portDefinitionFor(inputBody, profile);
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#InputPortDefinition"), inputBodyDef.getTypeURI());
-//				assertEquals(Scufl2Tools.PORT_DEFINITION.resolve("#binary"),
-//						inputBodyDef.getPropertyAsResourceURI(Scufl2Tools.PORT_DEFINITION.resolve("#dataType")));
-
-
-			}
-
-*/
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/316e4a8a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestXPathActivityParser.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestXPathActivityParser.java b/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestXPathActivityParser.java
deleted file mode 100644
index 9e6c23d..0000000
--- a/taverna-scufl2-t2flow/src/test/java/org/apache/taverna/scufl2/translator/t2flow/t23activities/TestXPathActivityParser.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.taverna.scufl2.translator.t2flow.t23activities;
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNotNull;
-
-import java.net.URL;
-
-import org.apache.taverna.scufl2.api.common.Scufl2Tools;
-import org.apache.taverna.scufl2.api.container.WorkflowBundle;
-import org.apache.taverna.scufl2.api.core.Processor;
-import org.apache.taverna.scufl2.api.profiles.Profile;
-import org.apache.taverna.scufl2.translator.t2flow.T2FlowParser;
-import org.junit.Test;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-
-public class TestXPathActivityParser {
-
-	private static final String XPATH_WORKFLOW_SANS_EXAMPLE_XML = "/xpath_workflow.t2flow";
-	private static Scufl2Tools scufl2Tools = new Scufl2Tools();
-
-	@Test
-	public void parseXPathActivityWorkflow() throws Exception {
-		URL wfResource = getClass().getResource(XPATH_WORKFLOW_SANS_EXAMPLE_XML);
-		assertNotNull("Could not find workflow " + XPATH_WORKFLOW_SANS_EXAMPLE_XML, wfResource);
-		T2FlowParser parser = new T2FlowParser();
-		parser.setStrict(false);
-		WorkflowBundle wfBundle = parser.parseT2Flow(wfResource.openStream());
-		Profile profile = wfBundle.getMainProfile();
-		//XPath_height has missing xmlDocument from its configuration
-		Processor heightProc = wfBundle.getMainWorkflow().getProcessors().getByName("XPath_height");
-		ObjectNode heightConfig = scufl2Tools
-				.configurationForActivityBoundToProcessor(heightProc, profile).getJsonAsObjectNode();
-		assertNotNull(heightConfig);
-		assertEquals("//height/text()",heightConfig.get("xpathExpression").textValue());
-		assertFalse(heightConfig.has("exampleXmlDocument"));
-		//XPath_width has xmlDocument
-		Processor widthProc = wfBundle.getMainWorkflow().getProcessors().getByName("XPath_width");
-		ObjectNode widthConfig = scufl2Tools
-				.configurationForActivityBoundToProcessor(widthProc, profile).getJsonAsObjectNode();		
-		assertNotNull(widthConfig);		
-		assertEquals("//width/text()",widthConfig.get("xpathExpression").asText());		
-		assertTrue(widthConfig.has("exampleXmlDocument"));		
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/316e4a8a/taverna-scufl2-t2flow/src/test/resources/T3-1226-annotations-with-quotes.t2flow
----------------------------------------------------------------------
diff --git a/taverna-scufl2-t2flow/src/test/resources/T3-1226-annotations-with-quotes.t2flow b/taverna-scufl2-t2flow/src/test/resources/T3-1226-annotations-with-quotes.t2flow
deleted file mode 100644
index 3f9aa3e..0000000
--- a/taverna-scufl2-t2flow/src/test/resources/T3-1226-annotations-with-quotes.t2flow
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0"?>
-<!-- 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-workbench-core-2.5.0-20140804T1456"><dataflow id="73a04132-5dc0-4e24-8a30-6ef91c773ad1" role="top"><name>T3_1226_test_with__s</name><inputPorts><port><name>a</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>"quote at the start</text>
-      </annotationBean>
-      <date>2014-12-08 12:28:56.410 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>quote at the end"</text>
-      </annotationBean>
-      <date>2014-12-08 12:28:50.238 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port></inputPorts><outputPorts><port><name>b</name><lastPredictedDepth>0</lastPredictedDepth><annotations /></port></outputPorts><processors /><conditions /><datalinks><datalink><sink type="dataflow"><port>b</port></sink><source type="dataflow"><port>a</port></source></datalink></datalinks><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.Author">
-        <text>Stian Soiland-Reyes</text>
-      </annotationBean>
-      <date>2014-12-08 12:28:31.323 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
-        <identification>73a04132-5dc0-4e24-8a30-6ef91c773ad1</identification>
-      </annotationBean>
-      <date>2014-12-08 12:30:06.624 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
-        <identification>bb55dae2-8d6e-4971-9694-9e4beaccca46</identification>
-      </annotationBean>
-      <date>2014-12-08 12:29:50.55 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle">
-        <text>T3-1226 test with 'single quote'</text>
-      </annotationBean>
-      <date>2014-12-08 12:30:04.611 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>This comment contains """triple quotes""" inside.</text>
-      </annotationBean>
-      <date>2014-12-08 12:29:12.250 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/316e4a8a/taverna-scufl2-t2flow/src/test/resources/annotated2.2.t2flow
----------------------------------------------------------------------
diff --git a/taverna-scufl2-t2flow/src/test/resources/annotated2.2.t2flow b/taverna-scufl2-t2flow/src/test/resources/annotated2.2.t2flow
deleted file mode 100644
index 31b1412..0000000
--- a/taverna-scufl2-t2flow/src/test/resources/annotated2.2.t2flow
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0"?>
-<!-- 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- -->
-<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="9e1f7ffd-3bf9-4ba8-9c63-03b79b1858ad" role="top"><name>Workflow_title</name><inputPorts><port><name>in0</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>Only example</text>
-      </annotationBean>
-      <date>2010-07-21 11:19:58.897 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port><port><name>in1</name><depth>1</depth><granularDepth>1</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>Only description</text>
-      </annotationBean>
-      <date>2010-07-21 11:19:47.699 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port><port><name>in2</name><depth>2</depth><granularDepth>2</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>Some kind </text>
-      </annotationBean>
-      <date>2010-07-21 11:19:34.518 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>Workflow input in2</text>
-      </annotationBean>
-      <date>2010-07-21 11:19:25.509 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port></inputPorts><outputPorts><port><name>out0</name><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text />
-      </annotationBean>
-      <date>2010-07-21 11:26:10.972 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>First annotation</text>
-      </annotationBean>
-      <date>2010-07-21 11:20:30.875 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>Not empty</text>
-      </annotationBean>
-      <date>2010-07-21 11:25:56.668 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>Third annotation</text>
-      </annotationBean>
-      <date>2010-07-21 11:25:50.301 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>Empty again</text>
-      </annotationBean>
-      <date>2010-07-21 11:26:05.105 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>Second annotation</text>
-      </annotationBean>
-      <date>2010-07-21 11:25:39.729 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port><port><name>out1</name><annotations /></port></outputPorts><processors><processor><name>Beanshell</name><inputPorts /><outputPorts /><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>beanshell-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.beanshell.BeanshellActivity</class><inputMap /><outputMap /><configBean encoding="xstream"><net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean xmlns="">
-  <script />
-  <dependencies />
-  <classLoaderSharing>workflow</classLoaderSharing>
-  <localDependencies />
-  <artifactDependencies />
-  <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-      <handledReferenceSchemes />
-      <translatedElementType>java.lang.String</translatedElementType>
-      <allowsLiteralValues>true</allowsLiteralValues>
-      <name>in1</name>
-      <depth>0</depth>
-      <mimeTypes>
-        <string>text/plain</string>
-      </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
-  </inputs>
-  <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-      <granularDepth>0</granularDepth>
-      <name>out1</name>
-      <depth>0</depth>
-      <mimeTypes />
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
-  </outputs>
-</net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
-  <maxJobs>1</maxJobs>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
-  <backoffFactor>1.0</backoffFactor>
-  <initialDelay>1000</initialDelay>
-  <maxDelay>5000</maxDelay>
-  <maxRetries>0</maxRetries>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy /></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks /><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.DescriptiveTitle">
-        <text>Workflow title</text>
-      </annotationBean>
-      <date>2010-07-21 11:20:43.824 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.FreeTextDescription">
-        <text>Workflow description</text>
-      </annotationBean>
-      <date>2010-07-21 11:20:50.161 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
-        <identification>bb902d82-b0e4-46fc-bed5-950a3b38bb98</identification>
-      </annotationBean>
-      <date>2010-07-21 11:22:31.286 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
-        <identification>9e1f7ffd-3bf9-4ba8-9c63-03b79b1858ad</identification>
-      </annotationBean>
-      <date>2010-07-21 11:26:16.844 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.Author">
-        <text>Workflow author</text>
-      </annotationBean>
-      <date>2010-07-21 11:20:39.864 BST</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/316e4a8a/taverna-scufl2-t2flow/src/test/resources/annotation_with_backslash.t2flow
----------------------------------------------------------------------
diff --git a/taverna-scufl2-t2flow/src/test/resources/annotation_with_backslash.t2flow b/taverna-scufl2-t2flow/src/test/resources/annotation_with_backslash.t2flow
deleted file mode 100644
index b9da130..0000000
--- a/taverna-scufl2-t2flow/src/test/resources/annotation_with_backslash.t2flow
+++ /dev/null
@@ -1,23 +0,0 @@
-<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-core-2.5.0"><dataflow id="b550eb5c-d7ad-4a9b-8dea-fc16df39b9f4" role="top"><name>Workflow1</name><inputPorts><port><name>backslash</name><depth>0</depth><granularDepth>0</granularDepth><annotations><annotation_chain encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.ExampleValue">
-        <text>c:\Program Files\</text>
-      </annotationBean>
-      <date>2014-04-30 10:51:51.81 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain></annotations></port></inputPorts><outputPorts /><processors /><conditions /><datalinks /><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
-  <annotationAssertions>
-    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
-        <identification>b550eb5c-d7ad-4a9b-8dea-fc16df39b9f4</identification>
-      </annotationBean>
-      <date>2014-04-30 10:52:13.935 UTC</date>
-      <creators />
-      <curationEventList />
-    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
-  </annotationAssertions>
-</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file