jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject svn commit: r1534038 [2/3] - in /jena/Experimental/new-test: ./ src/test/java/ src/test/java/com/hp/hpl/jena/graph/ src/test/java/com/hp/hpl/jena/graph/compose/ src/test/java/com/hp/hpl/jena/graph/impl/ src/test/java/com/hp/hpl/jena/mem/ src/test/java/...
Date Mon, 21 Oct 2013 06:41:00 GMT
Added: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java?rev=1534038&view=auto
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java (added)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java Mon Oct 21 06:40:58 2013
@@ -0,0 +1,96 @@
+/*
+ * 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 com.hp.hpl.jena.graph.compose;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.junit.Test;
+import com.hp.hpl.jena.graph.Graph;
+import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.graph.TripleMatch;
+import com.hp.hpl.jena.util.iterator.ExtendedIterator;
+
+import org.xenei.junit.contract.IProducer;
+
+import static com.hp.hpl.jena.testing_framework.GraphHelper.*;
+
+public class PolyadicTest<T extends Polyadic> {
+
+	protected IProducer<T> producer;
+	
+	public PolyadicTest() {
+		producer = new IProducer<T>(){
+
+			@Override
+			public T newInstance() {
+				MultiUnion retval = new MultiUnion();
+				Graph g = memGraph();
+				retval.addGraph(g);
+				retval.setBaseGraph( g);
+				return (T) retval;
+			}
+
+			@Override
+			public void cleanUp() {
+			}}; 
+	}
+	
+	@Test
+	public void testSetBaseGraph()
+	{
+		Polyadic poly = producer.newInstance();
+		Graph g = memGraph();
+		try {
+		poly.setBaseGraph( g );
+		fail( "Should have thrown IllegalArgumentException");
+		} catch (IllegalArgumentException expected)
+		{
+			// expected
+		}
+		poly.addGraph(g);
+		poly.setBaseGraph( g );
+		assertEquals( "Did not set base graph", g, poly.getBaseGraph());
+	}
+	
+	@Test
+	public void testAddGraph()
+	{
+		Polyadic poly = producer.newInstance();
+		List<Graph> lst = poly.getSubGraphs();
+		Graph g = memGraph();
+		poly.addGraph( g );
+		List<Graph> lst2 = poly.getSubGraphs();
+		assertEquals( "Wrong number of sub graphs", lst.size()+1, lst2.size());
+		assertTrue( "Some orignial graph missing", lst2.containsAll( lst ));
+		assertTrue( "New graph not found", lst2.contains( g ));
+	}
+	
+	@Test
+	public void testRemoveGraph()
+	{
+		Polyadic poly = producer.newInstance();
+		Graph g = memGraph();
+		poly.addGraph( g );
+		assertTrue( "graph was not added", poly.getSubGraphs().contains(g));
+		poly.removeGraph(g);
+		assertFalse( "graph was not removed", poly.getSubGraphs().contains(g));
+	}
+
+}

Propchange: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/PolyadicTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/UnionTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/UnionTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/UnionTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/compose/UnionTest.java Mon Oct 21 06:40:58 2013
@@ -41,32 +41,40 @@ import com.hp.hpl.jena.util.iterator.Ext
 
 @RunWith(ContractSuite.class)
 @ContractImpl(Union.class)
-public class UnionTest extends AbstractDyadicTest {
+public class UnionTest extends DyadicTest<Union> {
 
-	private IProducer<Union> graphProducer = new AbstractGraphProducer<Union>() {
+	public UnionTest()
+	{
+		producer = new AbstractGraphProducer<Union>() {
 		@Override
 		protected Union createNewGraph() {
 			Graph g1 = GraphFactory.createGraphMem();
 			Graph g2 = GraphFactory.createGraphMem();
 			return new Union(g1, g2);
-		}
-
-	};
+		}};
 
-	@Override
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public IProducer<Union> getGraphProducer() {
-		return graphProducer;
 	}
 
+
+	public void setDeltaTestProducer(IProducer<Union> producer)
+	{
+		this.producer = producer;
+	}
+	
+	@Contract.Inject	
+	public final IProducer<Union> getDyadicTestProducer()
+	{
+		return producer;
+	}
+	
 	@Test
 	public void testUnion() {
 		Graph g1 = graphWith("x R y; p R q");
-		Graph g2 = graphWith("r A s; x R y");
+		Graph g2 = graphWith("r Foo s; x R y");
 		Union u = new Union(g1, g2);
 		assertContains("Union", "x R y", u);
 		assertContains("Union", "p R q", u);
-		assertContains("Union", "r A s", u);
+		assertContains("Union", "r Foo s", u);
 		if (u.size() != 3)
 			fail("oops: size of union is not 3");
 		u.add(triple("cats eat cheese"));

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphSuite.java Mon Oct 21 06:40:58 2013
@@ -18,30 +18,41 @@
 
 package com.hp.hpl.jena.graph.impl;
 
+import java.lang.reflect.Method;
 import java.util.HashSet;
 
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.Contract.Inject;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
+
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.Triple;
 import com.hp.hpl.jena.graph.impl.CollectionGraph;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@RunWith( ContractSuite.class )
+@ContractImpl( CollectionGraph.class )
 public class CollectionGraphSuite extends AbstractGraphSuite {
 
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new GraphProducer());
-	}
-
-	public static class GraphProducer extends
-			AbstractGraphProducer<CollectionGraph> {
+	private AbstractGraphProducer<CollectionGraph> producer = new 
+			AbstractGraphProducer<CollectionGraph>() {
 		@Override
 		public CollectionGraph createNewGraph() {
 			return new CollectionGraph(new HashSet<Triple>());
 		}
+	};
+
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 
+	
+
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/CollectionGraphTest.java Mon Oct 21 06:40:58 2013
@@ -43,7 +43,7 @@ public class CollectionGraphTest {
 
 	};
 
-	@Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Inject
 	public IProducer<CollectionGraph> getGraphProducer() {
 		return graphProducer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphMakerTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphMakerTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphMakerTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphMakerTest.java Mon Oct 21 06:40:58 2013
@@ -70,7 +70,7 @@ public class FileGraphMakerTest {
 		}
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<FileGraphMaker> getGraphMakerProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphSuite.java Mon Oct 21 06:40:58 2013
@@ -21,6 +21,7 @@ package com.hp.hpl.jena.graph.impl;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 
 import static org.junit.Assert.*;
@@ -31,8 +32,14 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Suite;
 import org.junit.runners.Parameterized.Parameters;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
+
 import static com.hp.hpl.jena.testing_framework.GraphHelper.*;
 
+import com.hp.hpl.jena.graph.AbstractGraphSuite;
 import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.GraphUtil;
 import com.hp.hpl.jena.graph.impl.FileGraph;
@@ -45,12 +52,12 @@ import com.hp.hpl.jena.util.FileUtils;
  * Test FileGraph by seeing if we can make some file graphs and then read them
  * back.
  */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ FileGraphSuite.TestNames.class,
-		FileGraphSuite.FileNameTests.class,
-		FileGraphSuite.FileNameTransactionTests.class })
-public class FileGraphSuite {
 
+@RunWith( ContractSuite.class )
+@ContractImpl( FileGraph.class )
+public class FileGraphSuite extends AbstractGraphSuite {
+
+	
 	public static class GraphProducer extends AbstractGraphProducer<FileGraph> {
 		private String suffix = ".nt";
 		private String prefix = "tfg";
@@ -87,6 +94,25 @@ public class FileGraphSuite {
 		}
 
 	}
+	
+	private FileGraphSuite.GraphProducer producer = new FileGraphSuite.GraphProducer();
+	
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
+	}
+
+	@Override
+	public Collection<Class<?>> getSuiteClasses() {
+		List<Class<?>> lst = new ArrayList<Class<?>>();
+		
+		lst.addAll( super.getSuiteClasses() );
+		lst.addAll( Arrays.asList( new Class<?>[]{
+		FileGraphSuite.TestNames.class,
+		FileGraphSuite.FileNameTests.class,
+		FileGraphSuite.FileNameTransactionTests.class } ));
+		return lst;
+	}
 
 	/**
 	 * Test that the graph encoded as the test-string content can be written out
@@ -202,7 +228,7 @@ public class FileGraphSuite {
 		@Test
 		public void testTransactionCommitThenAbort() {
 			Graph initial = graphWith(graphProducer.newInstance(),
-					"A pings B; B pings C");
+					"Foo pings B; B pings C");
 			Graph extra = graphWith(graphProducer.newInstance(),
 					"C pingedBy B; fileGraph rdf:type Graph");
 			File foo = FileUtils.tempFileName("fileGraph", ".nt");

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/FileGraphTest.java Mon Oct 21 06:40:58 2013
@@ -35,7 +35,7 @@ public class FileGraphTest {
 
 	protected IProducer<FileGraph> graphProducer = new FileGraphSuite.GraphProducer();
 
-	@Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Inject
 	public IProducer<FileGraph> getGraphProducer() {
 		return graphProducer;
 	}
@@ -113,7 +113,7 @@ public class FileGraphTest {
 	// }
 	//
 	// public void testTransactionCommitThenAbort() {
-	// Graph initial = graphWithTxn("A pings B; B pings C");
+	// Graph initial = graphWithTxn("Foo pings B; B pings C");
 	// Graph extra = graphWithTxn("C pingedBy B; fileGraph rdf:type Graph");
 	// File foo = FileUtils.tempFileName("fileGraph", ".nt");
 	// Graph g = new FileGraph(foo, true, true);

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleEventManagerTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleEventManagerTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleEventManagerTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleEventManagerTest.java Mon Oct 21 06:40:58 2013
@@ -49,7 +49,7 @@ public class SimpleEventManagerTest {
 		}
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<SimpleEventManager> getEventManagerProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleGraphMakerTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleGraphMakerTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleGraphMakerTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/SimpleGraphMakerTest.java Mon Oct 21 06:40:58 2013
@@ -46,7 +46,7 @@ public class SimpleGraphMakerTest {
 
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<SimpleGraphMaker> getGraphMaker() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/TripleStoreContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/TripleStoreContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/TripleStoreContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/TripleStoreContractTest.java Mon Oct 21 06:40:58 2013
@@ -20,38 +20,68 @@ package com.hp.hpl.jena.graph.impl;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
 import static org.junit.Assert.*;
 
 import static com.hp.hpl.jena.testing_framework.GraphHelper.*;
-
+import com.hp.hpl.jena.mem.GraphTripleStore;
 import com.hp.hpl.jena.graph.impl.TripleStore;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
+
 import org.xenei.junit.contract.IProducer;
 
 /**
  * AbstractTestTripleStore - post-hoc tests for TripleStores.
  */
 @Contract(TripleStore.class)
-public abstract class TripleStoreContractTest {
+@Ignore
+public class TripleStoreContractTest<T extends TripleStore> extends ContractTemplate<T> {
+
+	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 );
+	}
+	
 	/**
 	 * Subclasses must over-ride to return a new empty TripleStore.
 	 */
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public abstract IProducer<TripleStore> getTripleStoreProducer();
+	@Contract.Inject
+	public final void setTripleStoreContractTestProducer(IProducer<T> producer)
+	{
+		super.setProducer( producer );
+	}
 
-	protected TripleStore store;
 
+	
 	@Before
 	public final void beforeAbstractTripleStoreTest() {
-		store = getTripleStoreProducer().newInstance();
+		store = getProducer().newInstance();
 	}
 
 	@After
 	public final void afterAbstractTripleStoreTest() {
-		getTripleStoreProducer().cleanUp();
+		getProducer().cleanUp();
 	}
 
 	@Test

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphSuite.java Mon Oct 21 06:40:58 2013
@@ -26,24 +26,32 @@ import org.junit.runners.Suite;
 
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
+
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.impl.WrappedGraph;
 import com.hp.hpl.jena.sparql.graph.GraphFactory;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@RunWith( ContractSuite.class )
+@ContractImpl( WrappedGraph.class )
 public class WrappedGraphSuite extends AbstractGraphSuite {
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new GraphProducer());
-	}
-
-	public static class GraphProducer extends
-			AbstractGraphProducer<WrappedGraph> {
+	private AbstractGraphProducer<WrappedGraph> producer = 
+			new AbstractGraphProducer<WrappedGraph>(){
 		@Override
 		public WrappedGraph createNewGraph() {
 			return new WrappedGraph(GraphFactory.createGraphMem());
 		}
+	};
+	
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 
+
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/graph/impl/WrappedGraphTest.java Mon Oct 21 06:40:58 2013
@@ -33,6 +33,9 @@ import org.xenei.junit.contract.Contract
 import com.hp.hpl.jena.graph.Factory;
 import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.graph.impl.WrappedGraph;
+import com.hp.hpl.jena.sparql.graph.GraphFactory;
+import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
+
 import org.xenei.junit.contract.IProducer;
 
 @RunWith(ContractSuite.class)
@@ -43,7 +46,13 @@ public class WrappedGraphTest {
 
 	public WrappedGraphTest()
 	{
-		this( new WrappedGraphSuite.GraphProducer() );
+		graphProducer = 
+				new AbstractGraphProducer<WrappedGraph>(){
+			@Override
+			public WrappedGraph createNewGraph() {
+				return new WrappedGraph(GraphFactory.createGraphMem());
+			}
+		};
 	}
 	
 	protected WrappedGraphTest( IProducer<? extends WrappedGraph> producer )
@@ -52,7 +61,7 @@ public class WrappedGraphTest {
 	}
 	
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<? extends WrappedGraph> getGraphProducer() {
 		return graphProducer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/ArrayBunchTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/ArrayBunchTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/ArrayBunchTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/ArrayBunchTest.java Mon Oct 21 06:40:58 2013
@@ -42,7 +42,7 @@ public class ArrayBunchTest {
 
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<ArrayBunch> getBunchProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/BunchMapContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/BunchMapContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/BunchMapContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/BunchMapContractTest.java Mon Oct 21 06:40:58 2013
@@ -26,6 +26,7 @@ import java.util.List;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
@@ -35,14 +36,41 @@ import com.hp.hpl.jena.util.iterator.Ext
 /**
  * Test triple bunch implementations - NOT YET FINISHED
  */
+@Ignore
 @Contract(BunchMap.class)
-public abstract class BunchMapContractTest {
-
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	protected abstract IProducer<BunchMap> getBunchMapProducer();
-
+public class BunchMapContractTest {
 	private BunchMap map;
 
+	private IProducer<? extends BunchMap> producer;
+	
+//	public BunchMapContractTest()
+//	{
+//		producer = new IProducer<BunchMap>(){
+//
+//			@Override
+//			public BunchMap newInstance() {
+//				return new HashedBunchMap();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				// TODO Auto-generated method stub
+//				
+//			}};
+//	}
+
+	@Contract.Inject
+	public final void setBunchMapProducer(IProducer<? extends BunchMap> producer)
+	{
+		this.producer = producer;
+	}
+
+	protected final IProducer<? extends BunchMap> getBunchMapProducer()
+	{
+		return producer;
+	}
+
+	
 	@Before
 	public final void beforeAbstractBunchMapTest() {
 		map = getBunchMapProducer().newInstance();

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemSuite.java Mon Oct 21 06:40:58 2013
@@ -20,24 +20,34 @@ package com.hp.hpl.jena.mem;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.xenei.junit.contract.ContractImpl;
+import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 
 import com.hp.hpl.jena.graph.AbstractGraphSuite;
 import com.hp.hpl.jena.graph.Graph;
+import com.hp.hpl.jena.graph.impl.WrappedGraph;
 import com.hp.hpl.jena.testing_framework.AbstractGraphProducer;
 
-@RunWith(Suite.class)
+@RunWith( ContractSuite.class )
+@ContractImpl( GraphMem.class )
 public class GraphMemSuite extends AbstractGraphSuite {
 
-	@BeforeClass
-	public static void beforeClass() {
-		setGraphProducer(new GraphProducer());
-	}
-
-	public static class GraphProducer extends AbstractGraphProducer {
+	
+	private AbstractGraphProducer<GraphMem> producer = 
+			new AbstractGraphProducer<GraphMem>(){
 		@Override
-		protected Graph createNewGraph() {
+		protected GraphMem createNewGraph() {
 			return new GraphMem();
 		}
+	};
+	
+	@Dynamic.Inject
+	public IProducer<? extends Graph> getCollectionGraphSuiteProducer() {
+		return producer;
 	}
 
+
+
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphMemTest.java Mon Oct 21 06:40:58 2013
@@ -52,7 +52,7 @@ public class GraphMemTest {
 
 	};
 
-	@Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Inject
 	public IProducer<GraphMem> getGraphProducer() {
 		return graphProducer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphTripleStoreTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphTripleStoreTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphTripleStoreTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/GraphTripleStoreTest.java Mon Oct 21 06:40:58 2013
@@ -44,7 +44,7 @@ public class GraphTripleStoreTest {
 
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<GraphTripleStore> getTripleStore() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedBunchMapTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedBunchMapTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedBunchMapTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedBunchMapTest.java Mon Oct 21 06:40:58 2013
@@ -42,7 +42,7 @@ public class HashedBunchMapTest {
 		}
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<HashedBunchMap> getBunchMapProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedTripleBunchTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedTripleBunchTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedTripleBunchTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/HashedTripleBunchTest.java Mon Oct 21 06:40:58 2013
@@ -63,7 +63,7 @@ public class HashedTripleBunchTest {
 		}
 	}
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<HashedTripleBunch> getBunchProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/TripleBunchContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/TripleBunchContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/TripleBunchContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/TripleBunchContractTest.java Mon Oct 21 06:40:58 2013
@@ -29,6 +29,7 @@ import java.util.Set;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
@@ -40,11 +41,37 @@ import com.hp.hpl.jena.util.iterator.Ext
 /**
  * Test triple bunch implementations - NOT YET FINISHED
  */
+@Ignore
 @Contract(TripleBunch.class)
-public abstract class TripleBunchContractTest {
-
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	public abstract IProducer<TripleBunch> getTripleBunchProducer();
+public class TripleBunchContractTest {
+	private IProducer<? extends TripleBunch> producer;
+	
+//	public TripleBunchContractTest()
+//	{
+//		producer = new IProducer<ArrayBunch>(){
+//
+//			@Override
+//			public ArrayBunch newInstance() {
+//				return new ArrayBunch();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				// TODO Auto-generated method stub
+//				
+//			}};
+//	}
+
+	@Contract.Inject
+	public final void setTripleBunchProducer( IProducer<? extends TripleBunch> producer )
+	{
+		this.producer = producer;
+	}
+	
+	protected final IProducer<? extends TripleBunch> getTripleBunchProducer()
+	{
+		return producer;
+	}
 
 	public static final TripleBunch EMPTY_BUNCH = new ArrayBunch();
 

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/WrappedHashMapTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/WrappedHashMapTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/WrappedHashMapTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/mem/WrappedHashMapTest.java Mon Oct 21 06:40:58 2013
@@ -42,7 +42,7 @@ public class WrappedHashMapTest {
 		}
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public IProducer<WrappedHashMap> getBunchMapProducer() {
 		return producer;
 	}

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelContractSuite.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelContractSuite.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelContractSuite.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelContractSuite.java Mon Oct 21 06:40:58 2013
@@ -4,50 +4,61 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.junit.Ignore;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.xenei.junit.contract.Contract;
 import org.xenei.junit.contract.ContractImpl;
 import org.xenei.junit.contract.ContractSuite;
+import org.xenei.junit.contract.Dynamic;
+import org.xenei.junit.contract.IProducer;
 import org.xenei.junit.contract.Contract.Inject;
 
 import static com.hp.hpl.jena.testing_framework.ModelHelper.*;
+
+import com.hp.hpl.jena.graph.Graph;
 import com.hp.hpl.jena.testing_framework.IContainerProducer;
 import com.hp.hpl.jena.testing_framework.AbstractModelProducer;
+import com.hp.hpl.jena.testing_framework.IIteratorProducer;
 import com.hp.hpl.jena.testing_framework.INodeProducer;
 import com.hp.hpl.jena.testing_framework.IResourceProducer;
 import com.hp.hpl.jena.testing_framework.IStatementProducer;
-import com.hp.hpl.jena.util.iterator.ExtendedIteratorContractTests.IteratorProducer;
 import com.hp.hpl.jena.vocabulary.RDF;
 
-@Suite.SuiteClasses({ 
-	AbstractModelContractSuite.ModelContractTests.class,
-		AbstractModelContractSuite.AltMethodsTests.class,
-		AbstractModelContractSuite.BagMethodsTests.class,
-		AbstractModelContractSuite.SeqMethodsTests.class,
-		//AbstractModelContractSuite.ResourceTests.class,
-		AbstractModelContractSuite.StatementTests.class,
-		AbstractModelContractSuite.StatementIterTests.class,
-		AbstractModelContractSuite.NodeIterTests.class,
-		AbstractModelContractSuite.NameSpaceIteratorTests.class,
-		//AbstractModelContractSuite.ReifiedStatementIteratorTests.class
-		})
-public abstract class AbstractModelContractSuite {
-
-	static protected AbstractModelProducer<Model> modelProducer;
-
-	public static void setModelProducer(
-			AbstractModelProducer<Model> modelProducer) {
-		AbstractModelContractSuite.modelProducer = modelProducer;
+@Ignore
+public abstract class AbstractModelContractSuite implements Dynamic {
+
+	public List<Class<?>> getSuiteClasses() {
+		Class<?>[] classes = {
+				AbstractModelContractSuite.ModelContractTests.class,
+				AbstractModelContractSuite.AltMethodsTests.class,
+				AbstractModelContractSuite.BagMethodsTests.class,
+				AbstractModelContractSuite.SeqMethodsTests.class,
+				// AbstractModelContractSuite.ResourceTests.class,
+				AbstractModelContractSuite.StatementTests.class,
+				AbstractModelContractSuite.StatementIterTests.class,
+				AbstractModelContractSuite.NodeIterTests.class,
+				AbstractModelContractSuite.NameSpaceIteratorTests.class,
+		// AbstractModelContractSuite.ReifiedStatementIteratorTests.class
+		};
+		return Arrays.asList(classes);
 	}
 
 	@RunWith(ContractSuite.class)
 	@ContractImpl(Model.class)
 	public static class ModelContractTests {
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		private AbstractModelProducer<Model> producer;
+		
+		@Contract.Inject
 		public AbstractModelProducer<Model> getModelProducer() {
-			return modelProducer;
+			return producer;
+		}
+		
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.producer = producer;
 		}
 
 	}
@@ -59,6 +70,8 @@ public abstract class AbstractModelContr
 	@ContractImpl(A.class)
 	public static class AltMethodsTests {
 
+		private AbstractModelProducer<Model> modelProducer;
+		
 		private IContainerProducer<Alt> producer = new IContainerProducer<Alt>() {
 			private Model model = null;
 
@@ -102,11 +115,16 @@ public abstract class AbstractModelContr
 			}
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		@Contract.Inject
 		public IContainerProducer<Alt> getAltProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
 
 	public interface B extends Bag {
@@ -116,6 +134,8 @@ public abstract class AbstractModelContr
 	@ContractImpl(B.class)
 	public static class BagMethodsTests {
 
+		private AbstractModelProducer<Model> modelProducer;
+		
 		private IContainerProducer<Bag> producer = new IContainerProducer<Bag>() {
 			private Model model = null;
 
@@ -159,10 +179,16 @@ public abstract class AbstractModelContr
 			}
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		@Contract.Inject
 		public IContainerProducer<Bag> getBagProducer() {
 			return producer;
 		}
+		
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
 
 	public interface S extends Seq {
@@ -171,6 +197,9 @@ public abstract class AbstractModelContr
 	@RunWith(ContractSuite.class)
 	@ContractImpl(S.class)
 	public static class SeqMethodsTests {
+		
+		private AbstractModelProducer<Model> modelProducer;
+		
 		private IContainerProducer<Seq> producer = new IContainerProducer<Seq>() {
 			private Model model = null;
 
@@ -214,28 +243,28 @@ public abstract class AbstractModelContr
 			}
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		@Contract.Inject
 		public IContainerProducer<Seq> getSeqProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
+
 	}
 
-	//
-	// public static class RDFNodeTests extends RDFNodeContractTests {
-	//
-	// @Override
-	// protected NodeProducerInterface getNodeProducer() {
-	// return nodeProducer;
-	// }
-	//
-	// }
-	//
 	public interface R extends Resource {
 	}
+
 	@RunWith(ContractSuite.class)
 	@ContractImpl(R.class)
 	public static class ResourceTests {
+		
+		private AbstractModelProducer<Model> modelProducer;
+		
 		private INodeProducer<Resource> producer = new INodeProducer<Resource>() {
 			private Model model;
 
@@ -264,10 +293,16 @@ public abstract class AbstractModelContr
 			}
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		@Contract.Inject
 		public INodeProducer<Resource> getNodeProducer() {
 			return producer;
 		}
+		
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 
 	}
 
@@ -277,6 +312,9 @@ public abstract class AbstractModelContr
 	@RunWith(ContractSuite.class)
 	@ContractImpl(Stmt.class)
 	public static class StatementTests {
+		
+		private AbstractModelProducer<Model> modelProducer;
+		
 		private IStatementProducer<Statement> producer = new IStatementProducer<Statement>() {
 
 			private Model model;
@@ -315,44 +353,49 @@ public abstract class AbstractModelContr
 			}
 		};
 
-		@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+		@Contract.Inject
 		public IStatementProducer<Statement> getStatementProducer() {
 			return producer;
 		}
-
+		
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
-	
+
 	public interface StmtIter extends StmtIterator {
 	}
 
 	@RunWith(ContractSuite.class)
-	@ContractImpl(StmtIterator.class)
+	@ContractImpl(StmtIter.class)
 	public static class StatementIterTests {
-		IteratorProducer<Statement> producer = new IteratorProducer<Statement>() {
-			
+
+		private AbstractModelProducer<Model> modelProducer;		
+		
+		private IIteratorProducer<Statement> producer = new IIteratorProducer<Statement>() {
+
 			Model m = null;
-			
-			Statement[] objs = { statement( "s p o" ), statement( "s p2 o2" ), statement( "s p3 o3 "),
-					statement( "s p o4" ) };
-			
-			
+
+			Statement[] objs = { statement("s p o"), statement("s p2 o2"),
+					statement("s p3 o3 "), statement("s p o4") };
+
 			@Override
 			public List<Statement> getList() {
-				return Arrays.asList( objs );
+				return Arrays.asList(objs);
 			}
 
 			@Override
 			public StmtIterator newInstance() {
 				return getModel().listStatements();
 			}
-			
+
 			private Model getModel() {
-				if (m == null)
-				{
+				if (m == null) {
 					m = modelProducer.newInstance();
-					for (Statement s : objs )
-					{
-						m.add( s );
+					for (Statement s : objs) {
+						m.add(s);
 					}
 				}
 				return m;
@@ -361,12 +404,12 @@ public abstract class AbstractModelContr
 			@Override
 			public void cleanUp() {
 			}
-			
+
 			@Override
 			public boolean supportsDelete() {
 				return true;
 			}
-			
+
 			@Override
 			public boolean isCopy() {
 				return false;
@@ -374,46 +417,50 @@ public abstract class AbstractModelContr
 
 		};
 
-		@Inject("com.hp.hpl.jena.util.iterator.ExtendedIteratorContractTests.IteratorProducer<%s>")
-		public IteratorProducer<Statement> getIteratorProducer() {
+		@Inject
+		public IIteratorProducer<Statement> getIteratorProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
-	
+
 	public interface NodeIter extends NodeIterator {
 	}
-
 	@RunWith(ContractSuite.class)
 	@ContractImpl(NodeIter.class)
 	public static class NodeIterTests {
-		IteratorProducer<RDFNode> producer = new IteratorProducer<RDFNode>() {
-			
+		
+		private AbstractModelProducer<Model> modelProducer;		
+		
+		private IIteratorProducer<RDFNode> producer = new IIteratorProducer<RDFNode>() {
+
 			Model m = null;
-			
-			RDFNode[] objs = { rdfNode("p" ), rdfNode( "p2" ), 
-					rdfNode("p3"), rdfNode("o3"),
-					rdfNode("o4" ) };
-			
+
+			RDFNode[] objs = { rdfNode("p"), rdfNode("p2"), rdfNode("p3"),
+					rdfNode("o3"), rdfNode("o4") };
+
 			@Override
 			public List<RDFNode> getList() {
-				return Arrays.asList( objs );
+				return Arrays.asList(objs);
 			}
 
 			@Override
 			public NodeIterator newInstance() {
 				return getModel().listObjects();
 			}
-			
+
 			private Model getModel() {
-				if (m == null)
-				{
+				if (m == null) {
 					m = modelProducer.newInstance();
-					Resource s = resource( "s" );
+					Resource s = resource("s");
 					Property p = property("p");
-					for (RDFNode o : objs )
-					{
-						m.add( s, p, o );
+					for (RDFNode o : objs) {
+						m.add(s, p, o);
 					}
 				}
 				return m;
@@ -422,12 +469,12 @@ public abstract class AbstractModelContr
 			@Override
 			public void cleanUp() {
 			}
-			
+
 			@Override
 			public boolean supportsDelete() {
 				return false;
 			}
-			
+
 			@Override
 			public boolean isCopy() {
 				return false;
@@ -435,79 +482,83 @@ public abstract class AbstractModelContr
 
 		};
 
-		@Inject("com.hp.hpl.jena.util.iterator.ExtendedIteratorContractTests.IteratorProducer<%s>")
-		public IteratorProducer<RDFNode> getIteratorProducer() {
+		@Contract.Inject
+		public IIteratorProducer<RDFNode> getIteratorProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
-	
+
 	public interface NSIter extends NsIterator {
 	}
-	
+
 	@RunWith(ContractSuite.class)
 	@ContractImpl(NSIter.class)
 	public static class NameSpaceIteratorTests {
-		IteratorProducer<String> producer = new IteratorProducer<String>() {
-			
+		
+		private AbstractModelProducer<Model> modelProducer;		
+		
+		private IIteratorProducer<String> producer = new IIteratorProducer<String>() {
+
 			Model m = null;
-			
-			String[] uris = { "http://example.com/one/",  
-					"http://example.com/two/", 
-					"http://example.com/three/", 
-					"http://example.com/four/", 
-					"http://example.com/five/",
-					RDF.type.getNameSpace()};
-			
+
+			String[] uris = { "http://example.com/one/",
+					"http://example.com/two/", "http://example.com/three/",
+					"http://example.com/four/", "http://example.com/five/",
+					RDF.type.getNameSpace() };
+
 			@Override
 			public List<String> getList() {
-				return Arrays.asList( uris );
+				return Arrays.asList(uris);
 			}
 
 			@Override
 			public NsIterator newInstance() {
 				return getModel().listNameSpaces();
 			}
-			
+
 			private Model getModel() {
-				if (m == null)
-				{
+				if (m == null) {
 					m = modelProducer.newInstance();
 					m.setNsPrefix("one", uris[0]);
-					Resource s = m.createResource( "http://example.com/res/s" );
-					Property p = m.createProperty( uris[0], "uno");
-					RDFNode o = m.createLiteral( "first");
-					m.add(s,p,o);
-					p = m.createProperty( uris[1], "dos");
-					o = m.createLiteral( "second");
-					m.add(s,p,o);
-					p = m.createProperty( uris[2], "tres");
-					o = m.createLiteral( "third");
-					m.add(s,p,o);
-					p = m.createProperty( uris[3], "quatro");
-					o = m.createLiteral( "fourth");
-					m.add(s,p,o);
+					Resource s = m.createResource("http://example.com/res/s");
+					Property p = m.createProperty(uris[0], "uno");
+					RDFNode o = m.createLiteral("first");
+					m.add(s, p, o);
+					p = m.createProperty(uris[1], "dos");
+					o = m.createLiteral("second");
+					m.add(s, p, o);
+					p = m.createProperty(uris[2], "tres");
+					o = m.createLiteral("third");
+					m.add(s, p, o);
+					p = m.createProperty(uris[3], "quatro");
+					o = m.createLiteral("fourth");
+					m.add(s, p, o);
 					p = RDF.type;
-					o = m.createResource( uris[4]+"cinco");
-					m.add(s,p,o);
+					o = m.createResource(uris[4] + "cinco");
+					m.add(s, p, o);
 				}
 				return m;
 			}
 
 			@Override
 			public void cleanUp() {
-				if (m!= null)
-				{
+				if (m != null) {
 					m.close();
 					m = null;
 				}
 			}
-			
+
 			@Override
 			public boolean supportsDelete() {
 				return true;
 			}
-			
+
 			@Override
 			public boolean isCopy() {
 				return true;
@@ -515,23 +566,32 @@ public abstract class AbstractModelContr
 
 		};
 
-		@Inject("com.hp.hpl.jena.util.iterator.ExtendedIteratorContractTests.IteratorProducer<%s>")
-		public IteratorProducer<String> getIteratorProducer() {
+		@Inject
+		public IIteratorProducer<String> getIteratorProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
-	
-	public interface ReifiedIterator extends RSIterator{}
+
+	public interface ReifiedIterator extends RSIterator {
+	}
+
 	@RunWith(ContractSuite.class)
 	@ContractImpl(ReifiedIterator.class)
 	public static class ReifiedStatementIteratorTests {
-		IteratorProducer<ReifiedStatement> producer = new IteratorProducer<ReifiedStatement>() {
-			
+		
+		private AbstractModelProducer<Model> modelProducer;		
+		
+		private IIteratorProducer<ReifiedStatement> producer = new IIteratorProducer<ReifiedStatement>() {
+
 			Model m = null;
 			List<ReifiedStatement> stmts;
-		
-			
+
 			@Override
 			public List<ReifiedStatement> getList() {
 				return stmts;
@@ -541,33 +601,31 @@ public abstract class AbstractModelContr
 			public RSIterator newInstance() {
 				return getModel().listReifiedStatements();
 			}
-			
+
 			private Model getModel() {
-				if (m == null)
-				{
+				if (m == null) {
 					m = modelProducer.newInstance();
-					stmts.add( m.createReifiedStatement( statement( "P S O" ) ));
-					stmts.add( m.createReifiedStatement( statement( "P S O2" ) ));
-					stmts.add( m.createReifiedStatement( statement( "P S2 O" ) ));
-					stmts.add( m.createReifiedStatement( statement( "P2 S O" ) ));
+					stmts.add(m.createReifiedStatement(statement("P S O")));
+					stmts.add(m.createReifiedStatement(statement("P S O2")));
+					stmts.add(m.createReifiedStatement(statement("P S2 O")));
+					stmts.add(m.createReifiedStatement(statement("P2 S O")));
 				}
 				return m;
 			}
 
 			@Override
 			public void cleanUp() {
-				if (m!= null)
-				{
+				if (m != null) {
 					m.close();
 					m = null;
 				}
 			}
-			
+
 			@Override
 			public boolean supportsDelete() {
 				return true;
 			}
-			
+
 			@Override
 			public boolean isCopy() {
 				return true;
@@ -575,21 +633,31 @@ public abstract class AbstractModelContr
 
 		};
 
-		@Inject("com.hp.hpl.jena.util.iterator.ExtendedIteratorContractTests.IteratorProducer<%s>")
-		public IteratorProducer<ReifiedStatement> getIteratorProducer() {
+		@Inject
+		public IIteratorProducer<ReifiedStatement> getIteratorProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
+	}
+
+	public interface P extends Property {
 	}
-	
-	public interface P extends Property{}
+
 	@RunWith(ContractSuite.class)
 	@ContractImpl(P.class)
 	public static class PropertyTests {
-		IResourceProducer<Property> producer = new IResourceProducer<Property>() {
-			
+		
+		private AbstractModelProducer<Model> modelProducer;		
+		
+		private IResourceProducer<Property> producer = new IResourceProducer<Property>() {
+
 			private Model m = null;
-			
+
 			@Override
 			public Property newInstance() {
 				return getModel().createProperty("");
@@ -597,8 +665,7 @@ public abstract class AbstractModelContr
 
 			@Override
 			public void cleanUp() {
-				if (m!= null)
-				{
+				if (m != null) {
 					m.close();
 					m = null;
 				}
@@ -606,13 +673,12 @@ public abstract class AbstractModelContr
 
 			@Override
 			public Property newInstance(String uri) {
-				return getModel().createProperty( uri );
+				return getModel().createProperty(uri);
 			}
 
 			@Override
 			public Model getModel() {
-				if (m == null)
-				{
+				if (m == null) {
 					m = modelProducer.newInstance();
 				}
 				return m;
@@ -626,10 +692,15 @@ public abstract class AbstractModelContr
 
 		};
 
-		@Inject("com.hp.hpl.jena.testing_framework.IResourceProducer<%s>")
+		@Contract.Inject
 		public IResourceProducer<Property> getIteratorProducer() {
 			return producer;
 		}
 
+		@Contract.Inject
+		public void setProducer(AbstractModelProducer<Model> producer)
+		{
+			this.modelProducer = producer;
+		}
 	}
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelMakerTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelMakerTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelMakerTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelMakerTest.java Mon Oct 21 06:40:58 2013
@@ -38,7 +38,6 @@ import org.junit.Test;
 /**
  * Test ModelMakerImpl using a mock GraphMaker.
  */
-@SuppressWarnings("deprecation")
 public abstract class AbstractModelMakerTest {
 	abstract protected ModelMaker getModelMaker();
 

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AltContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AltContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AltContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AltContractTest.java Mon Oct 21 06:40:58 2013
@@ -18,6 +18,7 @@
 
 package com.hp.hpl.jena.rdf.model;
 
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
@@ -27,14 +28,75 @@ import com.hp.hpl.jena.rdf.model.Literal
 import com.hp.hpl.jena.rdf.model.Resource;
 import com.hp.hpl.jena.rdf.model.Seq;
 import com.hp.hpl.jena.testing_framework.IContainerProducer;
+import com.hp.hpl.jena.vocabulary.RDF;
+
 import static com.hp.hpl.jena.testing_framework.ModelHelper.*;
 import static org.junit.Assert.*;
 
+@Ignore
 @Contract(Alt.class)
-public abstract class AltContractTest {
-
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.IContainerProducer<%s>")
-	public abstract IContainerProducer<Alt> getAltProducer();
+public class AltContractTest<T extends Alt> {
+	
+	private IContainerProducer<T> producer;
+	
+	
+//	@SuppressWarnings("unchecked")
+//	public AltContractTest()
+//	{
+//		IContainerProducer<T> p = (IContainerProducer<T>) new IContainerProducer<Alt>() {
+//			Model model = null;
+//
+//			@Override
+//			public Alt newInstance(String uri) {
+//				return getModel().createAlt(uri);
+//			}
+//
+//			@Override
+//			public Model getModel() {
+//				if (model == null) {
+//					model = ModelFactory.createDefaultModel();
+//				}
+//				return model;
+//			}
+//
+//			@Override
+//			public Alt newInstance() {
+//				return getModel().createAlt();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				model = null;
+//			}
+//
+//			@Override
+//			public Resource getContainerType() {
+//				return RDF.Alt;
+//			}
+//
+//			@Override
+//			public Class<? extends Container> getContainerClass() {
+//				return Alt.class;
+//			}
+//
+//			@Override
+//			public boolean supportsAnonymous() {
+//				return false;
+//			}
+//		};
+//		producer = p;
+//	}
+	
+	@Contract.Inject
+	public final void setAltContractTestProducer(IContainerProducer<T> producer)
+	{
+		this.producer = producer;
+	}
+	
+	protected final IContainerProducer<T> getAltProducer()
+	{
+		return producer;
+	}
 
 	@Test
 	public void testDefaults() {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/BagContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/BagContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/BagContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/BagContractTests.java Mon Oct 21 06:40:58 2013
@@ -18,15 +18,23 @@
 
 package com.hp.hpl.jena.rdf.model;
 
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
 import com.hp.hpl.jena.testing_framework.IContainerProducer;
 
+@Ignore
 @Contract(Bag.class)
-public abstract class BagContractTests {
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.IContainerProducer<%s>")
-	public abstract IContainerProducer<Bag> getBagProducer();
+public class BagContractTests<T extends Bag> {
+	private IContainerProducer<T> producer;
+	
+	@Contract.Inject
+	public final void setBagContractTestsBag(IContainerProducer<T> producer)
+	{
+		this.producer = producer;
+	}
+
 
 	@Test
 	public void dummyTestBecauseThereAreNoRealTests() {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ContainerContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ContainerContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ContainerContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ContainerContractTests.java Mon Oct 21 06:40:58 2013
@@ -29,13 +29,25 @@ import com.hp.hpl.jena.vocabulary.RDF;
 import static org.junit.Assert.*;
 
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
+@Ignore
 @Contract(Container.class)
-public abstract class ContainerContractTests {
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.IContainerProducer<%s>")
-	public abstract IContainerProducer<Container> getContainerProducer();
+public class ContainerContractTests<T extends Container> {
+	
+	private IContainerProducer<T> producer;
+	
+	@Contract.Inject
+	public final void setContainerContractTestsProducer(IContainerProducer<T> producer)
+	{
+		this.producer = producer;
+	}
+	
+	protected final IContainerProducer<T> getContainerProducer() {
+		return producer;
+	}
 
 	@Test
 	public void testContainerOfIntegers() {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/DefaultModelTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/DefaultModelTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/DefaultModelTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/DefaultModelTest.java Mon Oct 21 06:40:58 2013
@@ -44,16 +44,9 @@ public class DefaultModelTest {
 
 	};
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
+	@Contract.Inject
 	public AbstractModelProducer<ModelCom> getModelProducer() {
 		return producer;
 	}
 
-	// @Override
-	// @Test
-	// public void testIndependent() {
-	// // TODO Auto-generated method stub
-	//
-	// }
-
 }

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LiteralContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LiteralContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LiteralContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LiteralContractTest.java Mon Oct 21 06:40:58 2013
@@ -2112,7 +2112,7 @@ public abstract class LiteralContractTes
 	//
 	// @Test
 	// public void testCharacterLiterals() {
-	// testCharacter(model, 'A');
+	// testCharacter(model, 'Foo');
 	// testCharacter(model, 'a');
 	// testCharacter(model, '#');
 	// testCharacter(model, '@');
@@ -2250,7 +2250,7 @@ public abstract class LiteralContractTes
 	// @Test
 	// public void testPlainStringLiterals() {
 	// testPlainString(model, "");
-	// testPlainString(model, "A test string");
+	// testPlainString(model, "Foo test string");
 	// testPlainString(model, "Another test string");
 	// }
 	//
@@ -2279,16 +2279,16 @@ public abstract class LiteralContractTes
 	//
 	// @Test
 	// public void testStringLiteralEquality() {
-	// Assert.assertEquals(model.createLiteral("A"), model.createLiteral("A"));
+	// Assert.assertEquals(model.createLiteral("Foo"), model.createLiteral("Foo"));
 	// Assert.assertEquals(model.createLiteral("Alpha"),
 	// model.createLiteral("Alpha"));
 	// assertDiffer(model.createLiteral("Alpha"), model.createLiteral("Beta"));
-	// assertDiffer(model.createLiteral("A", "en"), model.createLiteral("A"));
-	// assertDiffer(model.createLiteral("A"), model.createLiteral("A", "en"));
-	// assertDiffer(model.createLiteral("A", "en"),
-	// model.createLiteral("A", "fr"));
-	// Assert.assertEquals(model.createLiteral("A", "en"),
-	// model.createLiteral("A", "en"));
+	// assertDiffer(model.createLiteral("Foo", "en"), model.createLiteral("Foo"));
+	// assertDiffer(model.createLiteral("Foo"), model.createLiteral("Foo", "en"));
+	// assertDiffer(model.createLiteral("Foo", "en"),
+	// model.createLiteral("Foo", "fr"));
+	// Assert.assertEquals(model.createLiteral("Foo", "en"),
+	// model.createLiteral("Foo", "en"));
 	// }
 	//
 	// // protected void testLiteralObject( Model model, int x )

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LockContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LockContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LockContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/LockContractTests.java Mon Oct 21 06:40:58 2013
@@ -20,12 +20,15 @@ package com.hp.hpl.jena.rdf.model;
 
 import org.junit.After;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xenei.junit.contract.Contract;
 
 import com.hp.hpl.jena.shared.Lock;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
+
 import org.xenei.junit.contract.IProducer;
 
 /**
@@ -35,11 +38,32 @@ import org.xenei.junit.contract.IProduce
  * independent or not.
  * 
  */
+@Ignore
 @Contract(Lock.class)
-public abstract class LockContractTests {
-
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	abstract public IProducer<Lock> getProducer();
+public class LockContractTests<T extends Lock> extends ContractTemplate<T> {
+	
+	
+//	@SuppressWarnings("unchecked")
+//	public LockContractTests() {
+//		setProducer( (IProducer<T>) new IProducer<Model>() {
+//			@Override
+//			public Model newInstance() {
+//				return ModelFactory.createDefaultModel();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				// do nothing
+//			}
+//
+//		} );
+//	}
+	@Contract.Inject
+	public final void setLockContractTestsProducer( IProducer<T> producer )
+	{
+		setProducer( producer );
+	}
+	
 
 	private static Logger log = LoggerFactory
 			.getLogger(LockContractTests.class);

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelConContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelConContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelConContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelConContractTests.java Mon Oct 21 06:40:58 2013
@@ -26,6 +26,7 @@ import java.util.List;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -41,6 +42,8 @@ import com.hp.hpl.jena.graph.NodeFactory
 import com.hp.hpl.jena.graph.impl.AdhocDatatype;
 import com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl;
 import org.xenei.junit.contract.IProducer;
+
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
 import com.hp.hpl.jena.testing_framework.NodeCreateUtils;
 import com.hp.hpl.jena.vocabulary.RDF;
 
@@ -51,16 +54,20 @@ import com.hp.hpl.jena.vocabulary.RDF;
  * independent or not.
  * 
  */
+@Ignore
 @Contract(ModelCon.class)
-public abstract class ModelConContractTests {
+public class ModelConContractTests<T extends ModelCon> extends ContractTemplate<T> {
 
 	private ModelCon modelCon;
 	private Model model;
 	private RecordingModelListener SL;
 
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	abstract public IProducer<ModelCon> getProducer();
-
+	@Contract.Inject
+	public final void setModelConContractTests( IProducer<T> producer )
+	{
+		super.setProducer(producer);
+	}
+	
 	private static Logger LOG = LoggerFactory
 			.getLogger(ModelConContractTests.class);
 
@@ -513,7 +520,7 @@ public abstract class ModelConContractTe
 	public void testCreateAlt_String() {
 		model.register(SL);
 		txnBegin(model);
-		final Alt tvAlt = modelCon.createAlt("http://exmple.com/A");
+		final Alt tvAlt = modelCon.createAlt("http://exmple.com/Foo");
 		txnCommit(model);
 
 		List<Statement> stmts = model.listStatements().toList();
@@ -522,7 +529,7 @@ public abstract class ModelConContractTe
 		assertEquals("Wrong object", RDF.Alt, stmts.get(0).getObject());
 		Assert.assertEquals("Wrong subject", tvAlt, stmts.get(0).getSubject());
 		SL.assertHas("add", stmts.get(0));
-		Assert.assertEquals("http://exmple.com/A", tvAlt.getURI());
+		Assert.assertEquals("http://exmple.com/Foo", tvAlt.getURI());
 		Assert.assertTrue("Alt should be alt", tvAlt.isAlt());
 		assertEquals("must be associated with model", modelCon,
 				tvAlt.getModel());
@@ -698,11 +705,11 @@ public abstract class ModelConContractTe
 		Resource typ = resource("ex:/type");
 		model.register(SL);
 		txnBegin(model);
-		Resource r = modelCon.createResource("A", typ);
+		Resource r = modelCon.createResource("Foo", typ);
 		txnCommit(model);
 		SL.assertHas("add", statement(r, RDF.type, typ));
 		assertEquals("must be associated with model", modelCon, r.getModel());
-		assertEquals("Wrong URI", "A", r.getURI());
+		assertEquals("Wrong URI", "Foo", r.getURI());
 		assertTrue("Should be in model", model.contains(r, RDF.type, typ));
 	}
 
@@ -2064,14 +2071,14 @@ public abstract class ModelConContractTe
 	// public void testRemoveModelPartial() {
 	// Assert.assertEquals("precondition: model must be empty", 0,
 	// model.size());
-	// final Model A = modelWithStatements(getModelProducer(),
+	// final Model Foo = modelWithStatements(getModelProducer(),
 	// "clouds offer rain; trees offer shelter");
 	// final Model B = modelWithStatements(getModelProducer(),
 	// "x R y; y Q z; z P x");
-	// model.add(A);
-	// assertIsoModels(A, model);
+	// model.add(Foo);
+	// assertIsoModels(Foo, model);
 	// model.add(B);
-	// model.remove(A);
+	// model.remove(Foo);
 	// assertIsoModels(B, model);
 	// model.remove(B);
 	// assertEquals(0, model.size());
@@ -2243,9 +2250,9 @@ public abstract class ModelConContractTe
 	// public void testRemoveModelWithReifications() {
 	// // final Model target = getModelProducer().newModel();
 	// // addReification(target, "x", "S P O");
-	// // addReification(target, "y", "A P B");
+	// // addReification(target, "y", "Foo P B");
 	// // final Model remove = getModelProducer().newModel();
-	// // addReification(remove, "y", "A P B");
+	// // addReification(remove, "y", "Foo P B");
 	// // final Model answer = getModelProducer().newModel();
 	// // addReification(answer, "x", "S P O");
 	// // target.remove(remove);
@@ -3250,8 +3257,8 @@ public abstract class ModelConContractTe
 	// /* */
 	// model.add(Arrays.asList(statements("t U v; w X y")));
 	// testGot(sl, "add", "t U v; w X y");
-	// model.remove(Arrays.asList(statements("z A b; c D e")));
-	// testGot(sl, "rem", "z A b; c D e");
+	// model.remove(Arrays.asList(statements("z Foo b; c D e")));
+	// testGot(sl, "rem", "z Foo b; c D e");
 	// /* */
 	// model.add(asIterator(statements("f G h; i J k")));
 	// testGot(sl, "add", "f G h; i J k");
@@ -3715,7 +3722,7 @@ public abstract class ModelConContractTe
 	// // FIXME simple selector
 	//
 	// /**
-	// * A plain SimpleSelector must be simple.
+	// * Foo plain SimpleSelector must be simple.
 	// */
 	// @Test
 	// public void testSimpleIsSimple() throws Exception {
@@ -3725,7 +3732,7 @@ public abstract class ModelConContractTe
 	// }
 	//
 	// /**
-	// * A random sub-class of SimpleSelector must not be simple.
+	// * Foo random sub-class of SimpleSelector must not be simple.
 	// */
 	// @Test
 	// public void testSimpleSubclassIsntSimple() throws Exception {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelContractTests.java Mon Oct 21 06:40:58 2013
@@ -45,6 +45,7 @@ import javax.xml.xpath.XPathFactory;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -68,16 +69,46 @@ import com.hp.hpl.jena.vocabulary.RDFS;
  * independent or not.
  * 
  */
+@Ignore
 @Contract(Model.class)
-public abstract class ModelContractTests {
+public class ModelContractTests<T extends Model> {
+	private AbstractModelProducer<T> producer;
+	
 	private Model model;
 	private RecordingModelListener SL;
 
 	private static Logger LOG = LoggerFactory
 			.getLogger(ModelContractTests.class);
+	
+	
+//	public ModelContractTests()
+//	{
+//		@SuppressWarnings("unchecked")
+//		AbstractModelProducer<T> p = (AbstractModelProducer<T>) new AbstractModelProducer<Model>() {
+//			@Override
+//			protected Model createNewModel() {
+//				return ModelFactory.createDefaultModel();
+//			}
+//
+//			@Override
+//			public boolean areIndependent() {
+//				return true;
+//			}
+//
+//		};
+//		producer = p;
+//	}
 
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.AbstractModelProducer<%s>")
-	abstract public AbstractModelProducer<Model> getProducer();
+	@Contract.Inject
+	public final void setProducer( AbstractModelProducer<T> producer )
+	{
+		this.producer = producer;
+	}
+	
+	protected final AbstractModelProducer<T> getProducer()
+	{
+		return producer;
+	}
 
 	@Before
 	final public void beforeModelContractTests() {
@@ -1877,11 +1908,11 @@ public abstract class ModelContractTests
 		assertFalse("Model had statements to start",
 				model.listStatements(null, null, (RDFNode) null).hasNext());
 
-		final Resource A = resource("A"), X = resource("X");
+		final Resource A = resource("Foo"), X = resource("X");
 		final Property P = property("P"), P1 = property("P1");
 		final RDFNode O = resource("O"), Y = resource("Y");
 		final String S1 = "S P O; S1 P O; S2 P O";
-		final String S2 = "A P1 O; A P1 B; A P1 _C";
+		final String S2 = "Foo P1 O; Foo P1 B; Foo P1 _C";
 		final String S3 = "X P1 Y; X P2 Y; X P3 Y";
 		txnBegin(model);
 		modelAdd(model, S1);
@@ -1895,7 +1926,7 @@ public abstract class ModelContractTests
 		checkReturns(S2, model.listStatements(A, P1, (RDFNode) null));
 		checkReturns(S3, model.listStatements(X, null, Y));
 
-		List<Statement> lst = model.listStatements(resource("A"), P, O)
+		List<Statement> lst = model.listStatements(resource("Foo"), P, O)
 				.toList();
 		assertEquals("Wrong number of statements", 0, lst.size());
 
@@ -3588,7 +3619,7 @@ public abstract class ModelContractTests
 	public void testWrite_OutputStream_String_String() throws Exception {
 		txnBegin(model);
 		modelAdd(model, "S P O; S P2 _1; S P3 'foo'");
-		model.add(resource("S"), property("P4"), model.createResource("A"));
+		model.add(resource("S"), property("P4"), model.createResource("Foo"));
 		txnCommit(model);
 
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -3602,7 +3633,7 @@ public abstract class ModelContractTests
 		assertTrue("Missing P", result.contains("<eh:/S> <eh:/P> <eh:/O>"));
 		// TODO figure out how to work iwth base
 		// assertTrue( "Missing P3", result.contains(
-		// "<eh:/S> <eh:/P3> <foo://bar/A>"));
+		// "<eh:/S> <eh:/P3> <foo://bar/Foo>"));
 
 	}
 
@@ -3671,7 +3702,7 @@ public abstract class ModelContractTests
 	public void testWrite_Writer_String_String() throws Exception {
 		txnBegin(model);
 		modelAdd(model, "S P O; S P2 _1; S P3 'foo'");
-		model.add(resource("S"), property("P4"), model.createResource("A"));
+		model.add(resource("S"), property("P4"), model.createResource("Foo"));
 		txnCommit(model);
 
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -3686,7 +3717,7 @@ public abstract class ModelContractTests
 		assertTrue("Missing P", result.contains("<eh:/S> <eh:/P> <eh:/O>"));
 		// TODO figure out how to work with base
 		// assertTrue( "Missing P3", result.contains(
-		// "<eh:/S> <eh:/P3> <foo://bar/A>"));
+		// "<eh:/S> <eh:/P3> <foo://bar/Foo>"));
 
 	}
 	

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelExtractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelExtractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelExtractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelExtractTest.java Mon Oct 21 06:40:58 2013
@@ -37,7 +37,7 @@ import org.junit.Test;
 public class ModelExtractTest {
 
 	/**
-	 * A ModelExtract implementation for testing.
+	 * Foo ModelExtract implementation for testing.
 	 * 
 	 * with access to root, result and subject values
 	 *
@@ -70,7 +70,7 @@ public class ModelExtractTest {
 	}
 
 	/**
-	 * A statement boundary that always returns true for stopAt.
+	 * Foo statement boundary that always returns true for stopAt.
 	 */
 	protected static final StatementBoundary sbTrue = new StatementBoundaryBase() {
 		@Override
@@ -80,7 +80,7 @@ public class ModelExtractTest {
 	};
 
 	/**
-	 * A statement boundary that always returns false for stopAt.
+	 * Foo statement boundary that always returns false for stopAt.
 	 */
 	protected static final StatementBoundary sbFalse = new StatementBoundaryBase() {
 		@Override

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelFactoryTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelFactoryTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelFactoryTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelFactoryTest.java Mon Oct 21 06:40:58 2013
@@ -38,7 +38,6 @@ import org.junit.Test;
  * behaviour.
  * 
  */
-
 public class ModelFactoryTest {
 
 	@Test

Copied: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelGraphInterfaceContractTests.java (from r1530718, jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelGraphInterfaceContractTests.java)
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelGraphInterfaceContractTests.java?p2=jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelGraphInterfaceContractTests.java&p1=jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelGraphInterfaceContractTests.java&r1=1530718&r2=1534038&rev=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/AbstractModelGraphInterfaceContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/ModelGraphInterfaceContractTests.java Mon Oct 21 06:40:58 2013
@@ -2,6 +2,8 @@ package com.hp.hpl.jena.rdf.model;
 
 import static org.junit.Assert.*;
 
+import org.junit.After;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -11,45 +13,73 @@ import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.NodeFactory;
 import com.hp.hpl.jena.graph.Triple;
 import com.hp.hpl.jena.graph.test.NodeCreateUtils;
+import com.hp.hpl.jena.testing_framework.ContractTemplate;
+
 import org.xenei.junit.contract.IProducer;
 
+@Ignore
 @Contract(ModelGraphInterface.class)
-public abstract class AbstractModelGraphInterfaceContractTests {
+public class ModelGraphInterfaceContractTests<T extends ModelGraphInterface> extends ContractTemplate<T> {
 
 	private static Logger log = LoggerFactory
-			.getLogger(AbstractModelGraphInterfaceContractTests.class);
-
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	abstract protected IProducer<ModelGraphInterface> getModelGraphInterfaceProducer();
+			.getLogger(ModelGraphInterfaceContractTests.class);
 
+//	@SuppressWarnings("unchecked")
+//	public ModelGraphInterfaceContractTests() {
+//		setProducer( (IProducer<T>) new IProducer<Model>() {
+//
+//			@Override
+//			public Model newInstance() {
+//				return ModelFactory.createDefaultModel();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//			}
+//
+//		});
+//		
+//	}
+	
+	@Contract.Inject
+	public final void setModelGraphInterfaceContractTestsProducer( IProducer<T> producer )
+	{
+		super.setProducer(producer);
+	}
+	
+	@After
+	final public void afterModelGraphInterfaceTest() {
+		getProducer().cleanUp();
+	}
+	
 	@Test
 	public void testAsRDFNode() {
 		// check URI resource
-		RDFNode r = getModelGraphInterfaceProducer().newInstance().asRDFNode(
-				NodeCreateUtils.create("A"));
+		RDFNode r = getProducer().newInstance().asRDFNode(
+				NodeCreateUtils.create("Foo"));
 
 		assertTrue("Should have been a URI resource", r.isURIResource());
-		assertEquals("Does not have the proper resource", "eh:/A", r
+		assertEquals("Does not have the proper resource", "eh:/Foo", r
 				.asResource().getURI());
 
 		// check literal
-		r = getModelGraphInterfaceProducer().newInstance().asRDFNode(
-				NodeFactory.createLiteral("A"));
+		r = getProducer().newInstance().asRDFNode(
+				NodeFactory.createLiteral("Foo"));
 
 		assertTrue("Should have been a literal resource", r.isLiteral());
-		assertEquals("Does not have the proper literal value", "A", r
+		assertEquals("Does not have the proper literal value", "Foo", r
 				.asLiteral().getString());
 
 		// check anonymous
 		Node n = NodeFactory.createAnon();
-		r = getModelGraphInterfaceProducer().newInstance().asRDFNode(n);
+		r = getProducer().newInstance().asRDFNode(n);
 
 		assertTrue("Should have been an anonymous resource", r.isAnon());
 		assertEquals("Does not have the proper literal value",
 				n.getBlankNodeId(), r.asResource().getId());
 
 		AnonId anonId = AnonId.create("foo");
-		r = getModelGraphInterfaceProducer().newInstance().asRDFNode(
+		r = getProducer().newInstance().asRDFNode(
 				NodeFactory.createAnon(anonId));
 
 		assertTrue("Should have been an anonymous resource", r.isAnon());
@@ -61,9 +91,9 @@ public abstract class AbstractModelGraph
 	@Test
 	public void testAsStatement() {
 		Triple t = new Triple(NodeFactory.createAnon(),
-				NodeCreateUtils.create("A"), NodeFactory.createLiteral("B"));
+				NodeCreateUtils.create("Foo"), NodeFactory.createLiteral("B"));
 
-		Statement s = getModelGraphInterfaceProducer().newInstance()
+		Statement s = getProducer().newInstance()
 				.asStatement(t);
 
 		assertEquals(t.getSubject(), s.getSubject().asNode());
@@ -73,30 +103,30 @@ public abstract class AbstractModelGraph
 
 	@Test
 	public void testGetGraph() {
-		assertNotNull(getModelGraphInterfaceProducer().newInstance().getGraph());
+		assertNotNull(getProducer().newInstance().getGraph());
 
 	}
 
 	@Test
 	public void testWrapAsResource() {
 		// check URI resource
-		Resource r = getModelGraphInterfaceProducer().newInstance()
-				.wrapAsResource(NodeCreateUtils.create("A"));
+		Resource r = getProducer().newInstance()
+				.wrapAsResource(NodeCreateUtils.create("Foo"));
 
 		assertTrue("Should have been a URI resource", r.isURIResource());
-		assertEquals("Does not have the proper resource", "eh:/A", r
+		assertEquals("Does not have the proper resource", "eh:/Foo", r
 				.asResource().getURI());
 
 		// check anonymous
 		Node n = NodeFactory.createAnon();
-		r = getModelGraphInterfaceProducer().newInstance().wrapAsResource(n);
+		r = getProducer().newInstance().wrapAsResource(n);
 
 		assertTrue("Should have been an anonymous resource", r.isAnon());
 		assertEquals("Does not have the proper literal value",
 				n.getBlankNodeId(), r.asResource().getId());
 
 		AnonId anonId = AnonId.create("foo");
-		r = getModelGraphInterfaceProducer().newInstance().wrapAsResource(
+		r = getProducer().newInstance().wrapAsResource(
 				NodeFactory.createAnon(anonId));
 
 		assertTrue("Should have been an anonymous resource", r.isAnon());

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/PropertyContractTest.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/PropertyContractTest.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/PropertyContractTest.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/PropertyContractTest.java Mon Oct 21 06:40:58 2013
@@ -24,14 +24,27 @@ import com.hp.hpl.jena.vocabulary.RDF;
 import com.hp.hpl.jena.vocabulary.RDFS;
 
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
+@Ignore
 @Contract(Property.class)
-public abstract class PropertyContractTest {
-
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.IResourceProducer<%s>")
-	public abstract IResourceProducer<Property> getResourceProducer();
+public class PropertyContractTest<T extends Property> {
+	
+	private  IResourceProducer<T> producer;
+
+	@Contract.Inject
+	public final void setProducer( IResourceProducer<T> producer )
+	{
+		this.producer = producer;
+	}
+	
+	
+	protected final IResourceProducer<T> getProducer() 
+	{
+		return producer;
+	}
 
 
 	// {
@@ -59,7 +72,7 @@ public abstract class PropertyContractTe
 	private void testOrdinalValue(final int i, final String URI) {
 		final String message = "property should have expected ordinal value for "
 				+ URI;
-		Assert.assertEquals(message, i, getResourceProducer().newInstance(URI).getOrdinal());
+		Assert.assertEquals(message, i, getProducer().newInstance(URI).getOrdinal());
 	}
 
 	@Test

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFListContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFListContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFListContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFListContractTests.java Mon Oct 21 06:40:58 2013
@@ -45,6 +45,7 @@ import java.util.List;
 
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import org.slf4j.Logger;
@@ -59,13 +60,69 @@ import org.xenei.junit.contract.Contract
  * 
  * 
  */
+@Ignore
 @Contract(RDFList.class)
-public abstract class RDFListContractTests {
-
-	@Contract.Inject( "org.xenei.junit.contract.IProducer<%s>" )
-	abstract public IResourceProducer<RDFList> getListProducer();
+public class RDFListContractTests<T extends RDFList> {
+	
+	private IResourceProducer<T> producer;
+
+	private Model model;	
+	
+//	public RDFListContractTests()
+//	{
+//		@SuppressWarnings("unchecked")
+//		IResourceProducer<T> p = (IResourceProducer<T>) new IResourceProducer<RDFList>() {
+//
+//			Model model;
+//			
+//			@Override
+//			public RDFList newInstance(String uri) {
+//				return getModel().createResource( uri ).as( RDFList.class );
+//			}
+//
+//			@Override
+//			public Model getModel() {
+//				if (model == null)
+//				{
+//					model = ModelFactory.createDefaultModel();
+//				}
+//				return model;
+//			}
+//
+//			@Override
+//			public RDFList newInstance() {
+//				return getModel().createList();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				if (model == null)
+//				{
+//					model.close();
+//					model = null;
+//				}
+//			}
+//
+//			@Override
+//			public boolean supportsAnonymous() {
+//				// TODO Auto-generated method stub
+//				return false;
+//			}
+//
+//		} ;
+//		producer =  p;
+//	}
+	
+	@Contract.Inject
+	public final void setRDFListContractTestsProducer(IResourceProducer<T> producer )
+	{
+		this.producer = producer;
+	}
+	
+	protected final  IResourceProducer<T> getListProducer() {
+		return producer;
+	}
 
-	private Model model;
 
 	@Before
 	final public void beforeRDFListContractTests() {
@@ -796,7 +853,7 @@ public abstract class RDFListContractTes
 	//
 	// }
 	//
-	// /** A simple extension to RDFList to test user-subclassing of RDFList */
+	// /** Foo simple extension to RDFList to test user-subclassing of RDFList */
 	// protected static interface UserList extends RDFList {
 	// }
 	//
@@ -849,7 +906,7 @@ public abstract class RDFListContractTes
 	// NS+"List" );
 	//
 	// /**
-	// * A factory for generating UserDefList facets from nodes in enhanced
+	// * Foo factory for generating UserDefList facets from nodes in enhanced
 	// graphs.
 	// */
 	// public static Implementation factoryForTests = new Implementation() {

Modified: jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFNodeContractTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFNodeContractTests.java?rev=1534038&r1=1534037&r2=1534038&view=diff
==============================================================================
--- jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFNodeContractTests.java (original)
+++ jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/rdf/model/RDFNodeContractTests.java Mon Oct 21 06:40:58 2013
@@ -38,20 +38,66 @@ import static org.junit.Assert.*;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.xenei.junit.contract.Contract;
 
 /**
  * This class tests various properties of RDFNodes.
  */
+@Ignore
 @Contract(RDFNode.class)
-public abstract class RDFNodeContractTests {
-
-	@Contract.Inject("com.hp.hpl.jena.testing_framework.INodeProducer<%s>")
-	public abstract INodeProducer<RDFNode> getNodeProducer();
+public class RDFNodeContractTests<T extends RDFNode> {
+	
+	private INodeProducer<T> producer;
 
 	protected RDFNode node;
 	protected Model model;
+	
+//	public RDFNodeContractTests()
+//	{
+//		producer = new INodeProducer<T>(){
+//			Model model = null;
+//
+//			@Override
+//			public T newInstance() {
+//				return (T) getModel().createResource();
+//			}
+//
+//			@Override
+//			public void cleanUp() {
+//				if (model != null)
+//				{
+//					model.close();
+//				}
+//				model = null;
+//			}
+//
+//			@Override
+//			public T newInstance(String uri) {
+//				return (T) getModel().createResource( uri );
+//			}
+//
+//			@Override
+//			public Model getModel() {
+//				if (model == null)
+//				{
+//					model = ModelFactory.createDefaultModel();
+//				}
+//				return model;
+//			}};
+//	}
+
+	@Contract.Inject
+	public final void setRDFNodeProducer( INodeProducer<T> producer )
+	{
+		this.producer = producer;
+	}
+	
+	public final INodeProducer<T> getNodeProducer()
+	{
+		return producer;
+	}
 
 	@Before
 	public final void beforeRDFNodeContractTests() {



Mime
View raw message