You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by cl...@apache.org on 2015/05/23 08:58:16 UTC

[06/25] jena git commit: updated contract tests.

updated contract tests.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/f97d604c
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/f97d604c
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/f97d604c

Branch: refs/heads/master
Commit: f97d604c837ec8f0ddf978fa895e70308d7f148a
Parents: 8018ea4
Author: Claude Warren <cl...@apache.org>
Authored: Mon Apr 27 22:40:03 2015 +0100
Committer: Claude Warren <cl...@apache.org>
Committed: Mon Apr 27 22:40:03 2015 +0100

----------------------------------------------------------------------
 jena-core/pom.xml                               |   1 +
 .../apache/jena/graph/GraphContractTest.java    |   4 +-
 .../graph/GraphEventManagerContractTest.java    |  14 ---
 .../jena/graph/GraphMakerContractTest.java      |  23 +---
 .../graph/GraphWithPerformContractTest.java     |  37 +++---
 .../graph/TransactionHandlerContractTest.java   |  13 ---
 .../jena/graph/impl/CollectionGraph_CS.java     |  67 +++++++++++
 .../jena/graph/impl/FileGraphMaker_CS.java      |  81 +++++++++++++
 .../impl/FileGraphTransactionHandler_CS.java    |  56 +++++++++
 .../apache/jena/graph/impl/FileGraph_CS.java    |  78 +++++++++++++
 .../jena/graph/impl/SimpleEventManager_CS.java  |  54 +++++++++
 .../jena/graph/impl/SimpleGraphMaker_CS.java    |  54 +++++++++
 .../graph/impl/SimpleTransactionHandler_CS.java |  54 +++++++++
 .../jena/graph/impl/TestCollectionGraph.java    |  67 -----------
 .../jena/graph/impl/TestWrappedGraph.java       |  63 ----------
 .../graph/impl/TripleStoreContractTest.java     |  16 ---
 .../apache/jena/graph/impl/WrappedGraph_CS.java |  63 ++++++++++
 .../java/org/apache/jena/mem/ArrayBunch_CS.java |  52 +++++++++
 .../java/org/apache/jena/mem/GraphMemTest.java  | 115 -------------------
 .../java/org/apache/jena/mem/GraphMem_CS.java   | 115 +++++++++++++++++++
 .../apache/jena/mem/GraphTripleStoreMem_CS.java |  51 ++++++++
 .../apache/jena/mem/GraphTripleStoreTest.java   |  51 --------
 .../apache/jena/mem/GraphTripleStore_CS.java    |  51 ++++++++
 .../org/apache/jena/mem/HashedBunchMap_CS.java  |  52 +++++++++
 .../apache/jena/mem/HashedTripleBunch_CS.java   |  50 ++++++++
 .../java/org/apache/jena/mem/SetBunch_CS.java   |  50 ++++++++
 .../org/apache/jena/mem/WrappedHashMap_CS.java  |  52 +++++++++
 .../testing_framework/ContractTemplate.java     |  18 +++
 .../GraphProducerInterface.java                 |  41 -------
 .../testing_framework/IContainerProducer.java   |  18 +++
 .../testing_framework/IIteratorProducer.java    |  18 +++
 .../testing_framework/IResourceProducer.java    |  18 +++
 .../jena/testing_framework/TestFileData.java    |  18 +++
 .../manifest/ManifestItem.java                  |  18 +++
 .../manifest/ManifestTest.java                  |  18 +++
 .../manifest/ManifestTestRunner.java            |  18 +++
 36 files changed, 1146 insertions(+), 423 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/pom.xml
----------------------------------------------------------------------
diff --git a/jena-core/pom.xml b/jena-core/pom.xml
index 1c2ff5a..6696660 100644
--- a/jena-core/pom.xml
+++ b/jena-core/pom.xml
@@ -117,6 +117,7 @@
 					</systemProperties>
 					<includes>
 						<include>com/hp/hpl/jena/test/TestPackage.java</include>
+						<include>**/*_CS.java</include>
 					</includes>
 				</configuration>
 			</plugin>

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/GraphContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/GraphContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/GraphContractTest.java
index a989bae..55ad955 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/GraphContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/GraphContractTest.java
@@ -57,9 +57,7 @@ import org.apache.jena.util.iterator.Map1;
 import static org.apache.jena.testing_framework.GraphHelper.*;
 
 /**
- * AbstractTestGraph provides a bunch of basic tests for something that purports
- * to be a Graph. The abstract method getGraph must be overridden in subclasses
- * to deliver a Graph of interest.
+ * Graph contract test.
  */
 @Contract(Graph.class)
 public class GraphContractTest<T extends Graph> extends

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/GraphEventManagerContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/GraphEventManagerContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/GraphEventManagerContractTest.java
index 426002d..d18bd52 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/GraphEventManagerContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/GraphEventManagerContractTest.java
@@ -33,7 +33,6 @@ import static org.junit.Assert.*;
 import org.apache.jena.graph.Graph;
 import org.apache.jena.graph.GraphEventManager;
 import org.apache.jena.graph.Triple;
-import org.apache.jena.graph.Factory;
 import org.apache.jena.testing_framework.ContractTemplate;
 import org.apache.jena.testing_framework.GraphHelper;
 import org.xenei.junit.contract.IProducer;
@@ -61,19 +60,6 @@ public class GraphEventManagerContractTest<T extends GraphEventManager> extends
 	private GraphEventManager gem;
 
 	public GraphEventManagerContractTest() {
-//		setProducer(new IProducer<T>() {
-//
-//			@SuppressWarnings("unchecked")
-//			@Override
-//			public T newInstance() {
-//				return (T) Factory.createGraphMem().getEventManager();
-//			}
-//
-//			@Override
-//			public void cleanUp() {
-//			}
-//		});
-
 	}
 
 	@Contract.Inject

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/GraphMakerContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/GraphMakerContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/GraphMakerContractTest.java
index 5fbd9c2..d5a3657 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/GraphMakerContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/GraphMakerContractTest.java
@@ -30,7 +30,6 @@ import org.apache.jena.graph.Graph;
 import org.apache.jena.graph.GraphMaker;
 import org.apache.jena.graph.Node;
 import org.apache.jena.graph.Triple;
-import org.apache.jena.graph.impl.SimpleGraphMaker;
 import org.apache.jena.shared.AlreadyExistsException;
 import org.apache.jena.shared.DoesNotExistException;
 import org.apache.jena.testing_framework.GraphHelper;
@@ -38,14 +37,8 @@ import org.xenei.junit.contract.IProducer;
 import org.apache.jena.testing_framework.TestUtils;
 
 /**
- * Abstract base class for testing graph factories. Subclasses define the method
- * <code>getGraphFactory()</code> which supplies a new graph factory to be
- * tested: ATGF invokes that during <code>setUp</code> and closes it in
- * <code>tearDown</code>.
- * <p>
- * This bunch of tests is not remotely exhaustive, but it was sufficent to drive
- * the development of the first full graph factory. (Although at the time it
- * wasn't abstract.)
+ * GraphMaker contract test.
+ *
  */
 @Contract(GraphMaker.class)
 public class GraphMakerContractTest {
@@ -55,18 +48,6 @@ public class GraphMakerContractTest {
 	private GraphMaker graphMaker;
 
 	public GraphMakerContractTest() {
-//		producer = new IProducer<GraphMaker>() {
-//
-//			@Override
-//			public GraphMaker newInstance() {
-//				return new SimpleGraphMaker();
-//			}
-//
-//			@Override
-//			public void cleanUp() {
-//
-//			}
-//		};
 	}
 
 	@Contract.Inject

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/GraphWithPerformContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/GraphWithPerformContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/GraphWithPerformContractTest.java
index aaaa85a..a4e233f 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/GraphWithPerformContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/GraphWithPerformContractTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.graph;
 
 import static org.apache.jena.testing_framework.GraphHelper.graphWith;
@@ -8,13 +26,10 @@ import static org.apache.jena.testing_framework.GraphHelper.txnCommit;
 import static org.junit.Assert.*;
 
 import org.junit.After;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.xenei.junit.contract.Contract;
 import org.xenei.junit.contract.ContractTest;
 
 import org.apache.jena.graph.impl.GraphWithPerform;
-import org.apache.jena.mem.GraphMem;
 import org.apache.jena.testing_framework.ContractTemplate;
 
 import org.xenei.junit.contract.IProducer;
@@ -30,23 +45,7 @@ public class GraphWithPerformContractTest<T extends GraphWithPerform> extends
 	// Recording listener for tests
 	protected RecordingGraphListener GL = new RecordingGraphListener();
 
-	private static final Logger LOG = LoggerFactory
-			.getLogger(GraphWithPerformContractTest.class);
-
-	@SuppressWarnings("unchecked")
 	public GraphWithPerformContractTest() {
-//		setProducer((IProducer<T>) new IProducer<GraphWithPerform>() {
-//
-//			@Override
-//			public GraphWithPerform newInstance() {
-//				return new GraphMem();
-//			}
-//
-//			@Override
-//			public void cleanUp() {
-//
-//			}
-//		});
 	}
 
 	@Contract.Inject

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/TransactionHandlerContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/TransactionHandlerContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/TransactionHandlerContractTest.java
index d26d7e9..8ffddbc 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/TransactionHandlerContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/TransactionHandlerContractTest.java
@@ -29,7 +29,6 @@ import static org.junit.Assert.*;
 
 import org.apache.jena.graph.TransactionHandler;
 import org.apache.jena.graph.Triple;
-import org.apache.jena.graph.impl.SimpleTransactionHandler;
 import org.apache.jena.shared.Command;
 import org.apache.jena.shared.JenaException;
 import org.xenei.junit.contract.IProducer;
@@ -47,18 +46,6 @@ public class TransactionHandlerContractTest {
 	private IProducer<TransactionHandler> producer;
 
 	public TransactionHandlerContractTest() {
-//		producer = new IProducer<TransactionHandler>() {
-//
-//			@Override
-//			public TransactionHandler newInstance() {
-//				return new SimpleTransactionHandler();
-//			}
-//
-//			@Override
-//			public void cleanUp() {
-//
-//			}
-//		};
 	}
 
 	@Contract.Inject

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/CollectionGraph_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/CollectionGraph_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/CollectionGraph_CS.java
new file mode 100644
index 0000000..b246f2b
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/CollectionGraph_CS.java
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import static org.apache.jena.testing_framework.GraphHelper.memGraph;
+
+import java.util.HashSet;
+
+import org.apache.jena.graph.Graph ;
+import org.apache.jena.graph.Triple ;
+import org.apache.jena.graph.impl.CollectionGraph ;
+import org.apache.jena.testing_framework.AbstractGraphProducer;
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(CollectionGraph.class)
+public class CollectionGraph_CS {
+	 
+	protected IProducer<CollectionGraph> graphProducer;
+	
+	public CollectionGraph_CS() {
+		graphProducer = new AbstractGraphProducer<CollectionGraph>() {
+			
+			@Override
+			protected CollectionGraph createNewGraph() {
+				return new CollectionGraph( new HashSet<Triple>() );
+			}
+
+			@Override
+			public Graph[] getDependsOn(Graph d) {
+				return null;
+			}
+
+			@Override
+			public Graph[] getNotDependsOn(Graph g) {
+				return new Graph[] { memGraph() };
+			}
+
+		};
+	}
+
+	@Contract.Inject
+	public final IProducer<CollectionGraph> getCollectionTestProducer() {
+		return graphProducer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphMaker_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphMaker_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphMaker_CS.java
new file mode 100644
index 0000000..5f1d36d
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphMaker_CS.java
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(FileGraphMaker.class)
+public class FileGraphMaker_CS {
+	 
+	protected IProducer<FileGraphMaker> graphProducer;
+	
+	public FileGraphMaker_CS() throws IOException {
+		graphProducer = new FileGraphMakerProducer();
+	}
+
+	@Contract.Inject
+	public final IProducer<FileGraphMaker> getCollectionTestProducer() {
+		return graphProducer;
+	}
+	
+	private static class FileGraphMakerProducer implements IProducer<FileGraphMaker> {
+		private Map<Path,FileGraphMaker> map;
+		
+		public FileGraphMakerProducer () throws IOException {
+			map = new HashMap<Path,FileGraphMaker>();
+		}
+		
+		
+		@Override
+		public FileGraphMaker newInstance() {
+			Path p;
+			try {
+				p = Files.createTempDirectory("fgm_CS");
+			} catch (IOException e) {
+				throw new RuntimeException( "Unable to create temp directory", e );
+			}
+			FileGraphMaker fgm = new FileGraphMaker( p.toString(), true);
+			map.put(p, fgm);
+			return fgm;
+		}
+
+		@Override
+		public void cleanUp() {
+			for (Path p : map.keySet())
+			{
+				map.get(p).close();
+				p.toFile().delete();
+			}
+			map.clear();
+		}
+
+	};
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphTransactionHandler_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphTransactionHandler_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphTransactionHandler_CS.java
new file mode 100644
index 0000000..5e0feb4
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraphTransactionHandler_CS.java
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(FileGraphTransactionHandler.class)
+public class FileGraphTransactionHandler_CS {
+	 
+	protected IProducer<FileGraphTransactionHandler> graphProducer;
+	
+	public FileGraphTransactionHandler_CS() {
+		graphProducer = new IProducer<FileGraphTransactionHandler>() {
+			
+			private FileGraph_CS.FileGraphProducer fgp = new FileGraph_CS.FileGraphProducer();
+			
+			@Override
+			public FileGraphTransactionHandler newInstance() {
+				return new FileGraphTransactionHandler( fgp.newInstance() );
+			}
+
+			@Override
+			public void cleanUp() {
+				fgp.cleanUp();
+			}
+
+		};
+	}
+
+	@Contract.Inject
+	public final IProducer<FileGraphTransactionHandler> getCollectionTestProducer() {
+		return graphProducer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraph_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraph_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraph_CS.java
new file mode 100644
index 0000000..b7bb6c3
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/FileGraph_CS.java
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import static org.apache.jena.testing_framework.GraphHelper.memGraph;
+
+import java.io.File;
+import java.io.IOException;
+import org.apache.jena.graph.Graph ;
+import org.apache.jena.testing_framework.AbstractGraphProducer;
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(FileGraph.class)
+public class FileGraph_CS {
+	 
+	protected IProducer<FileGraph> graphProducer;
+	
+	public FileGraph_CS() {
+		graphProducer = new FileGraphProducer();
+	}
+
+	@Contract.Inject
+	public final IProducer<FileGraph> getCollectionTestProducer() {
+		return graphProducer;
+	}
+	
+	public static class FileGraphProducer extends AbstractGraphProducer<FileGraph> {
+		
+		@Override
+		protected FileGraph createNewGraph() {
+			File f;
+			try {
+				f = File.createTempFile("fgp", ".ttl" );
+			} catch (IOException e) {
+				throw new RuntimeException( "Can not create file", e );
+			}
+			return new FileGraph( f, false, true );
+		}
+
+		@Override
+		public Graph[] getDependsOn(Graph d) {
+			return null;
+		}
+
+		@Override
+		public Graph[] getNotDependsOn(Graph g) {
+			return new Graph[] { memGraph() };
+		}
+		
+		@Override
+		protected void afterClose(Graph g) {
+			((FileGraph)g).name.delete();
+		}
+
+	};
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleEventManager_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleEventManager_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleEventManager_CS.java
new file mode 100644
index 0000000..bfe7a3c
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleEventManager_CS.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+
+import org.xenei.junit.contract.IProducer;
+
+/**
+ * Test the SimpleGraphFactory by extending AbstractTestGraphFactory and
+ * supplying new SimplGraphFactorys via getGraph.
+ */
+@RunWith(ContractSuite.class)
+@ContractImpl(SimpleEventManager.class)
+public class SimpleEventManager_CS {
+
+	private IProducer<SimpleEventManager> producer = new IProducer<SimpleEventManager>() {
+
+		@Override
+		public SimpleEventManager newInstance() {
+			return new SimpleEventManager();
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do.
+		}
+	};
+
+	@Contract.Inject
+	public IProducer<SimpleEventManager> getEventManagerProducer() {
+		return producer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleGraphMaker_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleGraphMaker_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleGraphMaker_CS.java
new file mode 100644
index 0000000..43dac19
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleGraphMaker_CS.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(SimpleGraphMaker.class)
+public class SimpleGraphMaker_CS {
+	 
+	protected IProducer<SimpleGraphMaker> graphProducer;
+	
+	public SimpleGraphMaker_CS() {
+		graphProducer = new IProducer<SimpleGraphMaker>() {
+			
+			@Override
+			public SimpleGraphMaker newInstance() {
+				return new SimpleGraphMaker();
+			}
+
+			@Override
+			public void cleanUp() {
+				// nothing to do
+			}
+
+		};
+	}
+
+	@Contract.Inject
+	public final IProducer<SimpleGraphMaker> getCollectionTestProducer() {
+		return graphProducer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleTransactionHandler_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleTransactionHandler_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleTransactionHandler_CS.java
new file mode 100644
index 0000000..da845ec
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/SimpleTransactionHandler_CS.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(SimpleTransactionHandler.class)
+public class SimpleTransactionHandler_CS {
+	 
+	protected IProducer<SimpleTransactionHandler> graphProducer;
+	
+	public SimpleTransactionHandler_CS() {
+		graphProducer = new IProducer<SimpleTransactionHandler>() {
+			
+			@Override
+			public SimpleTransactionHandler newInstance() {
+				return new SimpleTransactionHandler();
+			}
+
+			@Override
+			public void cleanUp() {
+				// nothing to do
+			}
+
+		};
+	}
+
+	@Contract.Inject
+	public final IProducer<SimpleTransactionHandler> getCollectionTestProducer() {
+		return graphProducer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/TestCollectionGraph.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/TestCollectionGraph.java b/jena-core/src/test/java/org/apache/jena/graph/impl/TestCollectionGraph.java
deleted file mode 100644
index 4d9f40d..0000000
--- a/jena-core/src/test/java/org/apache/jena/graph/impl/TestCollectionGraph.java
+++ /dev/null
@@ -1,67 +0,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.
- */
-
-package org.apache.jena.graph.impl;
-
-import static org.apache.jena.testing_framework.GraphHelper.memGraph;
-
-import java.util.HashSet;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.graph.impl.CollectionGraph ;
-import org.apache.jena.testing_framework.AbstractGraphProducer;
-import org.junit.runner.RunWith;
-import org.xenei.junit.contract.Contract;
-import org.xenei.junit.contract.ContractImpl;
-import org.xenei.junit.contract.ContractSuite;
-import org.xenei.junit.contract.IProducer;
-
-@RunWith(ContractSuite.class)
-@ContractImpl(CollectionGraph.class)
-public class TestCollectionGraph {
-	 
-	protected IProducer<CollectionGraph> graphProducer;
-	
-	public TestCollectionGraph() {
-		graphProducer = new AbstractGraphProducer<CollectionGraph>() {
-			
-			@Override
-			protected CollectionGraph createNewGraph() {
-				return new CollectionGraph( new HashSet<Triple>() );
-			}
-
-			@Override
-			public Graph[] getDependsOn(Graph d) {
-				return null;
-			}
-
-			@Override
-			public Graph[] getNotDependsOn(Graph g) {
-				return new Graph[] { memGraph() };
-			}
-
-		};
-	}
-
-	@Contract.Inject
-	public final IProducer<CollectionGraph> getDeltaTestProducer() {
-		return graphProducer;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/TestWrappedGraph.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/TestWrappedGraph.java b/jena-core/src/test/java/org/apache/jena/graph/impl/TestWrappedGraph.java
deleted file mode 100644
index 7910660..0000000
--- a/jena-core/src/test/java/org/apache/jena/graph/impl/TestWrappedGraph.java
+++ /dev/null
@@ -1,63 +0,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.
- */
-
-package org.apache.jena.graph.impl;
-
-import static org.apache.jena.testing_framework.GraphHelper.memGraph;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.testing_framework.AbstractGraphProducer;
-import org.junit.runner.RunWith;
-import org.xenei.junit.contract.Contract;
-import org.xenei.junit.contract.ContractImpl;
-import org.xenei.junit.contract.ContractSuite;
-import org.xenei.junit.contract.IProducer;
-
-@RunWith(ContractSuite.class)
-@ContractImpl(WrappedGraph.class)
-public class TestWrappedGraph {
-	 
-	protected IProducer<WrappedGraph> graphProducer;
-	
-	public TestWrappedGraph() {
-		graphProducer = new AbstractGraphProducer<WrappedGraph>() {
-			
-			@Override
-			protected WrappedGraph createNewGraph() {
-				return new WrappedGraph( memGraph() );
-			}
-
-			@Override
-			public Graph[] getDependsOn(Graph d) {
-				return null;
-			}
-
-			@Override
-			public Graph[] getNotDependsOn(Graph g) {
-				return new Graph[] { memGraph() };
-			}
-
-		};
-	}
-
-	@Contract.Inject
-	public final IProducer<WrappedGraph> getDeltaTestProducer() {
-		return graphProducer;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/TripleStoreContractTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/TripleStoreContractTest.java b/jena-core/src/test/java/org/apache/jena/graph/impl/TripleStoreContractTest.java
index 0b074aa..815a40d 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/impl/TripleStoreContractTest.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/TripleStoreContractTest.java
@@ -26,7 +26,6 @@ import org.xenei.junit.contract.ContractTest;
 import static org.junit.Assert.*;
 
 import static org.apache.jena.testing_framework.GraphHelper.*;
-import org.apache.jena.mem.GraphTripleStore;
 import org.apache.jena.graph.impl.TripleStore;
 import org.apache.jena.testing_framework.ContractTemplate;
 
@@ -43,21 +42,6 @@ public class TripleStoreContractTest<T extends TripleStore> extends
 	protected TripleStore store;
 
 	public TripleStoreContractTest() {
-		IProducer<TripleStore> producer = new IProducer<TripleStore>() {
-
-			@Override
-			public TripleStore newInstance() {
-				return new GraphTripleStore(memGraph());
-			}
-
-			@Override
-			public void cleanUp() {
-				// TODO Auto-generated method stub
-
-			}
-
-		};
-		setProducer((IProducer<T>) producer);
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/graph/impl/WrappedGraph_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/graph/impl/WrappedGraph_CS.java b/jena-core/src/test/java/org/apache/jena/graph/impl/WrappedGraph_CS.java
new file mode 100644
index 0000000..3cc5b1c
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/graph/impl/WrappedGraph_CS.java
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.graph.impl;
+
+import static org.apache.jena.testing_framework.GraphHelper.memGraph;
+
+import org.apache.jena.graph.Graph ;
+import org.apache.jena.testing_framework.AbstractGraphProducer;
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(WrappedGraph.class)
+public class WrappedGraph_CS {
+	 
+	protected IProducer<WrappedGraph> graphProducer;
+	
+	public WrappedGraph_CS() {
+		graphProducer = new AbstractGraphProducer<WrappedGraph>() {
+			
+			@Override
+			protected WrappedGraph createNewGraph() {
+				return new WrappedGraph( memGraph() );
+			}
+
+			@Override
+			public Graph[] getDependsOn(Graph d) {
+				return null;
+			}
+
+			@Override
+			public Graph[] getNotDependsOn(Graph g) {
+				return new Graph[] { memGraph() };
+			}
+
+		};
+	}
+
+	@Contract.Inject
+	public final IProducer<WrappedGraph> getDeltaTestProducer() {
+		return graphProducer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/ArrayBunch_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/ArrayBunch_CS.java b/jena-core/src/test/java/org/apache/jena/mem/ArrayBunch_CS.java
new file mode 100644
index 0000000..df8438e
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/ArrayBunch_CS.java
@@ -0,0 +1,52 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(ArrayBunch.class)
+public class ArrayBunch_CS {
+
+	protected IProducer<ArrayBunch> mapProducer = new IProducer<ArrayBunch>() {
+
+		@Override
+		public ArrayBunch newInstance() {
+			return new ArrayBunch();
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do
+		}
+
+		
+
+	};
+
+	@Inject
+	public IProducer<ArrayBunch> getGraphProducer() {
+		return mapProducer;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/GraphMemTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/GraphMemTest.java b/jena-core/src/test/java/org/apache/jena/mem/GraphMemTest.java
deleted file mode 100644
index 8fed109..0000000
--- a/jena-core/src/test/java/org/apache/jena/mem/GraphMemTest.java
+++ /dev/null
@@ -1,115 +0,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.
- */
-package org.apache.jena.mem;
-
-import static org.apache.jena.testing_framework.GraphHelper.*;
-import static org.junit.Assert.*;
-
-import java.util.Iterator;
-
-import org.junit.runner.RunWith;
-import org.xenei.junit.contract.Contract.Inject;
-import org.xenei.junit.contract.ContractImpl;
-import org.xenei.junit.contract.ContractSuite;
-import org.xenei.junit.contract.ContractTest;
-
-import org.apache.jena.graph.Graph;
-import org.apache.jena.graph.GraphStatisticsHandler;
-import org.apache.jena.graph.Node;
-import org.apache.jena.graph.Node_URI;
-import org.apache.jena.graph.Triple;
-import org.apache.jena.shared.JenaException;
-import org.apache.jena.testing_framework.AbstractGraphProducer;
-import org.xenei.junit.contract.IProducer;
-import org.apache.jena.util.iterator.ExtendedIterator;
-
-@RunWith(ContractSuite.class)
-@ContractImpl(GraphMem.class)
-public class GraphMemTest {
-
-	protected IProducer<GraphMem> graphProducer = new AbstractGraphProducer<GraphMem>() {
-
-		@Override
-		protected GraphMem createNewGraph() {
-			return new GraphMem();
-		}
-
-		@Override
-		public Graph[] getDependsOn(Graph g) {
-			return null;
-		}
-
-		@Override
-		public Graph[] getNotDependsOn(Graph g) {
-			return new Graph[] { memGraph() };
-		}
-
-	};
-
-	@Inject
-	public IProducer<GraphMem> getGraphProducer() {
-		return graphProducer;
-	}
-
-	@ContractTest
-	public void testHasStatistics() {
-		GraphStatisticsHandler h = graphProducer.newInstance()
-				.getStatisticsHandler();
-		assertNotNull(h);
-	}
-
-	@ContractTest
-	public void testContainsConcreteDoesntUseFind() {
-		Graph g = new GraphMemWithoutFind();
-		graphAdd(g, "x P y; a Q b");
-		assertTrue(g.contains(triple("x P y")));
-		assertTrue(g.contains(triple("a Q b")));
-		assertFalse(g.contains(triple("a P y")));
-		assertFalse(g.contains(triple("y R b")));
-	}
-
-	protected final class GraphMemWithoutFind extends GraphMem {
-		@Override
-		public ExtendedIterator<Triple> graphBaseFind(Triple t) {
-			throw new JenaException("find is Not Allowed");
-		}
-	}
-
-	@ContractTest
-	public void testUnnecessaryMatches() {
-		Node special = new Node_URI("eg:foo") {
-			@Override
-			public boolean matches(Node s) {
-				fail("Matched called superfluously.");
-				return true;
-			}
-		};
-		Graph g = graphWith(graphProducer.newInstance(), "x p y");
-		g.add(new Triple(special, special, special));
-		exhaust(g.find(special, Node.ANY, Node.ANY));
-		exhaust(g.find(Node.ANY, special, Node.ANY));
-		exhaust(g.find(Node.ANY, Node.ANY, special));
-
-	}
-
-	protected void exhaust(Iterator<?> it) {
-		while (it.hasNext())
-			it.next();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/GraphMem_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/GraphMem_CS.java b/jena-core/src/test/java/org/apache/jena/mem/GraphMem_CS.java
new file mode 100644
index 0000000..718432b
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/GraphMem_CS.java
@@ -0,0 +1,115 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import static org.apache.jena.testing_framework.GraphHelper.*;
+import static org.junit.Assert.*;
+
+import java.util.Iterator;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.ContractTest;
+
+import org.apache.jena.graph.Graph;
+import org.apache.jena.graph.GraphStatisticsHandler;
+import org.apache.jena.graph.Node;
+import org.apache.jena.graph.Node_URI;
+import org.apache.jena.graph.Triple;
+import org.apache.jena.shared.JenaException;
+import org.apache.jena.testing_framework.AbstractGraphProducer;
+import org.xenei.junit.contract.IProducer;
+import org.apache.jena.util.iterator.ExtendedIterator;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(GraphMem.class)
+public class GraphMem_CS {
+
+	protected IProducer<GraphMem> graphProducer = new AbstractGraphProducer<GraphMem>() {
+
+		@Override
+		protected GraphMem createNewGraph() {
+			return new GraphMem();
+		}
+
+		@Override
+		public Graph[] getDependsOn(Graph g) {
+			return null;
+		}
+
+		@Override
+		public Graph[] getNotDependsOn(Graph g) {
+			return new Graph[] { memGraph() };
+		}
+
+	};
+
+	@Inject
+	public IProducer<GraphMem> getGraphProducer() {
+		return graphProducer;
+	}
+
+	@ContractTest
+	public void testHasStatistics() {
+		GraphStatisticsHandler h = graphProducer.newInstance()
+				.getStatisticsHandler();
+		assertNotNull(h);
+	}
+
+	@ContractTest
+	public void testContainsConcreteDoesntUseFind() {
+		Graph g = new GraphMemWithoutFind();
+		graphAdd(g, "x P y; a Q b");
+		assertTrue(g.contains(triple("x P y")));
+		assertTrue(g.contains(triple("a Q b")));
+		assertFalse(g.contains(triple("a P y")));
+		assertFalse(g.contains(triple("y R b")));
+	}
+
+	protected final class GraphMemWithoutFind extends GraphMem {
+		@Override
+		public ExtendedIterator<Triple> graphBaseFind(Triple t) {
+			throw new JenaException("find is Not Allowed");
+		}
+	}
+
+	@ContractTest
+	public void testUnnecessaryMatches() {
+		Node special = new Node_URI("eg:foo") {
+			@Override
+			public boolean matches(Node s) {
+				fail("Matched called superfluously.");
+				return true;
+			}
+		};
+		Graph g = graphWith(graphProducer.newInstance(), "x p y");
+		g.add(new Triple(special, special, special));
+		exhaust(g.find(special, Node.ANY, Node.ANY));
+		exhaust(g.find(Node.ANY, special, Node.ANY));
+		exhaust(g.find(Node.ANY, Node.ANY, special));
+
+	}
+
+	protected void exhaust(Iterator<?> it) {
+		while (it.hasNext())
+			it.next();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreMem_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreMem_CS.java b/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreMem_CS.java
new file mode 100644
index 0000000..129e706
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreMem_CS.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+
+import org.apache.jena.graph.Graph;
+import org.apache.jena.mem.GraphTripleStore;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(GraphTripleStore.class)
+public class GraphTripleStoreMem_CS {
+
+	private IProducer<GraphTripleStoreMem> producer = new IProducer<GraphTripleStoreMem>() {
+
+		@Override
+		public GraphTripleStoreMem newInstance() {
+			return new GraphTripleStoreMem(Graph.emptyGraph);
+		}
+
+		@Override
+		public void cleanUp() {
+		}
+
+	};
+
+	@Contract.Inject
+	public IProducer<GraphTripleStoreMem> getTripleStore() {
+		return producer;
+	}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreTest.java b/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreTest.java
deleted file mode 100644
index 1f82935..0000000
--- a/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStoreTest.java
+++ /dev/null
@@ -1,51 +0,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.
- */
-
-package org.apache.jena.mem;
-
-import org.junit.runner.RunWith;
-import org.xenei.junit.contract.Contract;
-import org.xenei.junit.contract.ContractImpl;
-import org.xenei.junit.contract.ContractSuite;
-
-import org.apache.jena.graph.Graph;
-import org.apache.jena.mem.GraphTripleStore;
-import org.xenei.junit.contract.IProducer;
-
-@RunWith(ContractSuite.class)
-@ContractImpl(GraphTripleStore.class)
-public class GraphTripleStoreTest {
-
-	private IProducer<GraphTripleStore> producer = new IProducer<GraphTripleStore>() {
-
-		@Override
-		public GraphTripleStore newInstance() {
-			return new GraphTripleStore(Graph.emptyGraph);
-		}
-
-		@Override
-		public void cleanUp() {
-		}
-
-	};
-
-	@Contract.Inject
-	public IProducer<GraphTripleStore> getTripleStore() {
-		return producer;
-	}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStore_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStore_CS.java b/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStore_CS.java
new file mode 100644
index 0000000..c2a2d1c
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/GraphTripleStore_CS.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+
+import org.apache.jena.graph.Graph;
+import org.apache.jena.mem.GraphTripleStore;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(GraphTripleStore.class)
+public class GraphTripleStore_CS {
+
+	private IProducer<GraphTripleStore> producer = new IProducer<GraphTripleStore>() {
+
+		@Override
+		public GraphTripleStore newInstance() {
+			return new GraphTripleStore(Graph.emptyGraph);
+		}
+
+		@Override
+		public void cleanUp() {
+		}
+
+	};
+
+	@Contract.Inject
+	public IProducer<GraphTripleStore> getTripleStore() {
+		return producer;
+	}
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/HashedBunchMap_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/HashedBunchMap_CS.java b/jena-core/src/test/java/org/apache/jena/mem/HashedBunchMap_CS.java
new file mode 100644
index 0000000..cb64b57
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/HashedBunchMap_CS.java
@@ -0,0 +1,52 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(WrappedHashMap.class)
+public class HashedBunchMap_CS {
+
+	protected IProducer<HashedBunchMap> mapProducer = new IProducer<HashedBunchMap>() {
+
+		@Override
+		public HashedBunchMap newInstance() {
+			return new HashedBunchMap();
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do
+		}
+
+		
+
+	};
+
+	@Inject
+	public IProducer<HashedBunchMap> getGraphProducer() {
+		return mapProducer;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/HashedTripleBunch_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/HashedTripleBunch_CS.java b/jena-core/src/test/java/org/apache/jena/mem/HashedTripleBunch_CS.java
new file mode 100644
index 0000000..5db46a3
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/HashedTripleBunch_CS.java
@@ -0,0 +1,50 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(HashedTripleBunch.class)
+public class HashedTripleBunch_CS {
+
+	protected IProducer<HashedTripleBunch> mapProducer = new IProducer<HashedTripleBunch>() {
+
+		@Override
+		public HashedTripleBunch newInstance() {
+			return new HashedTripleBunch( new ArrayBunch() );
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do
+		}
+
+	};
+
+	@Inject
+	public IProducer<HashedTripleBunch> getGraphProducer() {
+		return mapProducer;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/SetBunch_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/SetBunch_CS.java b/jena-core/src/test/java/org/apache/jena/mem/SetBunch_CS.java
new file mode 100644
index 0000000..b6b1f69
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/SetBunch_CS.java
@@ -0,0 +1,50 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(SetBunch.class)
+public class SetBunch_CS {
+
+	protected IProducer<SetBunch> mapProducer = new IProducer<SetBunch>() {
+
+		@Override
+		public SetBunch newInstance() {
+			return new SetBunch( new ArrayBunch() );
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do
+		}
+
+	};
+
+	@Inject
+	public IProducer<SetBunch> getGraphProducer() {
+		return mapProducer;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/mem/WrappedHashMap_CS.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/mem/WrappedHashMap_CS.java b/jena-core/src/test/java/org/apache/jena/mem/WrappedHashMap_CS.java
new file mode 100644
index 0000000..25c2bb6
--- /dev/null
+++ b/jena-core/src/test/java/org/apache/jena/mem/WrappedHashMap_CS.java
@@ -0,0 +1,52 @@
+/*
+    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.
+ */
+package org.apache.jena.mem;
+
+import org.junit.runner.RunWith;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.IProducer;
+
+@RunWith(ContractSuite.class)
+@ContractImpl(WrappedHashMap.class)
+public class WrappedHashMap_CS {
+
+	protected IProducer<WrappedHashMap> mapProducer = new IProducer<WrappedHashMap>() {
+
+		@Override
+		public WrappedHashMap newInstance() {
+			return new WrappedHashMap();
+		}
+
+		@Override
+		public void cleanUp() {
+			// nothing to do
+		}
+
+		
+
+	};
+
+	@Inject
+	public IProducer<WrappedHashMap> getGraphProducer() {
+		return mapProducer;
+	}
+
+
+}

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/ContractTemplate.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/ContractTemplate.java b/jena-core/src/test/java/org/apache/jena/testing_framework/ContractTemplate.java
index f7a16e5..d981b10 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/ContractTemplate.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/ContractTemplate.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework;
 
 import org.xenei.junit.contract.IProducer;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/GraphProducerInterface.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/GraphProducerInterface.java b/jena-core/src/test/java/org/apache/jena/testing_framework/GraphProducerInterface.java
deleted file mode 100644
index 8c33eb1..0000000
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/GraphProducerInterface.java
+++ /dev/null
@@ -1,41 +0,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.
- */
-package org.apache.jena.testing_framework;
-
-/**
- * Creates the graph for testing. Implementations must track the creation of
- * graphs created with newGraph and close them when closeGraphs is called.
- * 
- */
-//public interface GraphProducerInterface<T> {
-//
-//	/**
-//	 * Returns a new Graph to take part in the test.
-//	 * 
-//	 * @return The graph implementation to test.
-//	 */
-//	public abstract Graph newGraph();
-//
-//	/**
-//	 * provides a hook to close down graphs. When called all graphs created by
-//	 * the newGraph() method should be closed. Note that some graphs may have
-//	 * been closed during the test, so graphs should be tested for being closed
-//	 * prior to closing.
-//	 */
-//	public abstract void closeGraphs();
-// }

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/IContainerProducer.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/IContainerProducer.java b/jena-core/src/test/java/org/apache/jena/testing_framework/IContainerProducer.java
index 41bc6df..6d43847 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/IContainerProducer.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/IContainerProducer.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework;
 
 import org.apache.jena.rdf.model.Container;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/IIteratorProducer.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/IIteratorProducer.java b/jena-core/src/test/java/org/apache/jena/testing_framework/IIteratorProducer.java
index 3178692..8e17cec 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/IIteratorProducer.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/IIteratorProducer.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/IResourceProducer.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/IResourceProducer.java b/jena-core/src/test/java/org/apache/jena/testing_framework/IResourceProducer.java
index ef9eead..3c74fb2 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/IResourceProducer.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/IResourceProducer.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework;
 
 import org.apache.jena.rdf.model.Resource;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/TestFileData.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/TestFileData.java b/jena-core/src/test/java/org/apache/jena/testing_framework/TestFileData.java
index 7b46366..d839c82 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/TestFileData.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/TestFileData.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework;
 
 import java.io.ByteArrayInputStream;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestItem.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestItem.java b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestItem.java
index 81999bd..9ba9028 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestItem.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestItem.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework.manifest;
 
 import org.apache.jena.n3.turtle.TurtleTestVocab;

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTest.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTest.java b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTest.java
index cfde240..f0d66b8 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTest.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework.manifest;
 
 public abstract class ManifestTest {

http://git-wip-us.apache.org/repos/asf/jena/blob/f97d604c/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTestRunner.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTestRunner.java b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTestRunner.java
index 616b444..ef38c7b 100644
--- a/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTestRunner.java
+++ b/jena-core/src/test/java/org/apache/jena/testing_framework/manifest/ManifestTestRunner.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.jena.testing_framework.manifest;
 
 import java.lang.annotation.Annotation;