polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [2/3] zest-java git commit: Renamed uowf to unitOfWorkFactory in AbstractZestTestcase
Date Fri, 15 Apr 2016 09:32:00 GMT
http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/PostgreSQLEntityStoreTest.java
index d2e31d7..c523a2a 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/PostgreSQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/PostgreSQLEntityStoreTest.java
@@ -117,7 +117,7 @@ public class PostgreSQLEntityStoreTest
     public void tearDown()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork(
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(
             UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
         );
         try

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
index 8cfa2db..2f4ff6c 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ElasticSearchTest.java
@@ -162,7 +162,7 @@ public class ElasticSearchTest
     {
         String title = "Foo Bar Bazar!";
 
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         EntityBuilder<Author> authorBuilder = uow.newEntityBuilder( Author.class );
         Author author = authorBuilder.instance();
@@ -202,7 +202,7 @@ public class ElasticSearchTest
 
         uow.complete();
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
 
         QueryBuilder<Post> queryBuilder = queryBuilderFactory.newQueryBuilder( Post.class );
         Query<Post> query = uow.newQuery( queryBuilder );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
index 2e0b249..e76d85b 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/zest/index/elasticsearch/ImmenseTermTest.java
@@ -122,18 +122,18 @@ public class ImmenseTermTest
     {
         long count = 10_000L;
         TestEntity testEntity;
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testEntity = uow.newEntity( TestEntity.class );
             for( long i = 0; i < count; i++ )
             {
-                TestEntity2 testEntity2 = uowf.currentUnitOfWork().newEntity( TestEntity2.class );
+                TestEntity2 testEntity2 = unitOfWorkFactory.currentUnitOfWork().newEntity( TestEntity2.class );
                 testEntity2.property().set( "test" );
                 testEntity.manyAssociation().add( testEntity2 );
             }
             uow.complete();
         }
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testEntity = uow.get( testEntity );
             Query<TestEntity2> query = uow.newQuery(

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
index 9de3b38..6827840 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsAllTest.java
@@ -313,7 +313,7 @@ public class ContainsAllTest
         builder = builder.where( QueryExpressions.containsAll(
                 QueryExpressions.templateFor( ExampleEntity.class ).strings(),
                 Iterables.iterable( strings ) ) );
-        return this.uowf.currentUnitOfWork().newQuery( builder ).find();
+        return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder ).find();
     }
 
     private ExampleEntity findEntityBasedOnValueStrings( String... valueStrings )
@@ -341,18 +341,18 @@ public class ContainsAllTest
         )
         );
 
-        return this.uowf.currentUnitOfWork().newQuery( builder );
+        return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder );
     }
 
     private ExampleEntity performContainsAllStringsTest( Set<String> entityStrings, Set<String> queryableStrings )
         throws Exception
     {
-        UnitOfWork creatingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
         String[] entityStringsArray = new String[entityStrings.size()];
         createEntityWithStrings( creatingUOW, this.valueBuilderFactory, entityStrings.toArray( entityStringsArray ) );
         creatingUOW.complete();
 
-        UnitOfWork queryingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
         try
         {
             String[] queryableStringsArray = new String[queryableStrings.size()];
@@ -368,12 +368,12 @@ public class ContainsAllTest
     private ExampleEntity performContainsAllStringValueTest( Set<String> entityStrings, Set<String> queryableStrings )
         throws Exception
     {
-        UnitOfWork creatingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
         String[] entityStringsArray = new String[entityStrings.size()];
         createEntityWithComplexValues( creatingUOW, this.valueBuilderFactory, entityStrings.toArray( entityStringsArray ) );
         creatingUOW.complete();
 
-        UnitOfWork queryingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
         try
         {
             String[] queryableStringsArray = new String[queryableStrings.size()];

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
index d003fd2..45a1ef8 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/ContainsTest.java
@@ -144,7 +144,7 @@ public class ContainsTest extends AbstractZestTest
             string
             )
       );
-      return this.uowf.currentUnitOfWork().newQuery( builder ).find();
+      return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder ).find();
 
    }
 
@@ -168,17 +168,17 @@ public class ContainsTest extends AbstractZestTest
             )
          );
 
-      return this.uowf.currentUnitOfWork().newQuery( builder);
+      return this.unitOfWorkFactory.currentUnitOfWork().newQuery( builder);
    }
 
    private ExampleEntity performContainsStringTest(Set<String> entityStrings, String queryableString) throws Exception
    {
-      UnitOfWork creatingUOW = this.uowf.newUnitOfWork();
+      UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
       String[] entityStringsArray = new String[entityStrings.size()];
       ContainsAllTest.createEntityWithStrings(creatingUOW, this.valueBuilderFactory, entityStrings.toArray(entityStringsArray));
       creatingUOW.complete();
 
-      UnitOfWork queryingUOW = this.uowf.newUnitOfWork();
+      UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
       try
       {
          ExampleEntity entity = this.findEntity(queryableString);
@@ -192,12 +192,12 @@ public class ContainsTest extends AbstractZestTest
 
    private ExampleEntity performContainsStringValueTest(Set<String> entityStrings, String queryableString) throws Exception
    {
-      UnitOfWork creatingUOW = this.uowf.newUnitOfWork();
+      UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
       String[] entityStringsArray = new String[entityStrings.size()];
       ContainsAllTest.createEntityWithComplexValues(creatingUOW, this.valueBuilderFactory, entityStrings.toArray(entityStringsArray));
       creatingUOW.complete();
 
-      UnitOfWork queryingUOW = this.uowf.newUnitOfWork();
+      UnitOfWork queryingUOW = this.unitOfWorkFactory.newUnitOfWork();
       try
       {
          ExampleEntity entity = this.findEntityBasedOnValueString(queryableString);

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
index cbbc68a..aef84ee 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/RDFPerformanceTest.java
@@ -95,7 +95,7 @@ public class RDFPerformanceTest extends AbstractZestTest
         List<ExampleEntity> entities = new ArrayList<ExampleEntity>();
         for (Integer x = 0; x < howMany; ++x)
         {
-            ExampleEntity exampleEntity = this.uowf.currentUnitOfWork().newEntity( ExampleEntity.class, "entity" + x );
+            ExampleEntity exampleEntity = this.unitOfWorkFactory.currentUnitOfWork().newEntity( ExampleEntity.class, "entity" + x );
 
             for (ExampleEntity entity : entities)
             {
@@ -116,14 +116,14 @@ public class RDFPerformanceTest extends AbstractZestTest
     {
         for (ExampleEntity entity : entities)
         {
-            this.uowf.currentUnitOfWork().remove( this.uowf.currentUnitOfWork().get( entity ) );
+            this.unitOfWorkFactory.currentUnitOfWork().remove( this.unitOfWorkFactory.currentUnitOfWork().get( entity ) );
         }
     }
 
     private List<ExampleEntity> doList( int howMany )
     {
         List<ExampleEntity> list = new ArrayList<ExampleEntity>();
-        UnitOfWork uow = this.uowf.newUnitOfWork();
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork();
         Iterator<ExampleEntity> iter = uow.newQuery( this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class ) ).iterator();
         int found = 0;
         while (iter.hasNext())
@@ -147,11 +147,11 @@ public class RDFPerformanceTest extends AbstractZestTest
 
     private void doRemove( int howMany )
     {
-        Iterator<ExampleEntity> iter = this.uowf.currentUnitOfWork().newQuery( this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class )).maxResults( howMany ).iterator();
+        Iterator<ExampleEntity> iter = this.unitOfWorkFactory.currentUnitOfWork().newQuery( this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class )).maxResults( howMany ).iterator();
         Integer removed = 0;
         while (iter.hasNext())
         {
-            this.uowf.currentUnitOfWork().remove( iter.next() );
+            this.unitOfWorkFactory.currentUnitOfWork().remove( iter.next() );
             ++removed;
         }
 
@@ -165,7 +165,7 @@ public class RDFPerformanceTest extends AbstractZestTest
     {
         long startTest = System.currentTimeMillis();
 
-        UnitOfWork creatingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork creatingUOW = this.unitOfWorkFactory.newUnitOfWork();
         Long startingTime = System.currentTimeMillis();
         List<ExampleEntity> entities = this.doCreate( howMany );
         LOG.info( "Time to create " + howMany + " entities (ms): " + (System.currentTimeMillis() - startingTime) );
@@ -178,7 +178,7 @@ public class RDFPerformanceTest extends AbstractZestTest
         List<ExampleEntity> entityList = this.doList( howMany );
 
         startingTime = System.currentTimeMillis();
-        UnitOfWork uow = this.uowf.newUnitOfWork();
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork();
         for (int i = 0; i < 1000; i++)
         {
             Query<ExampleEntity> query = uow.newQuery( this.queryBuilderFactory.newQueryBuilder( ExampleEntity.class ).
@@ -189,7 +189,7 @@ public class RDFPerformanceTest extends AbstractZestTest
         long endTest = System.currentTimeMillis();
         LOG.info( "Time to query " + howMany + " entities (ms): " + (endTest - startingTime) );
 
-        UnitOfWork deletingUOW = this.uowf.newUnitOfWork();
+        UnitOfWork deletingUOW = this.unitOfWorkFactory.newUnitOfWork();
         startingTime = System.currentTimeMillis();
         this.doRemoveAll( entityList );
 //      this.doRemove(200);

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi173/Qi173IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi173/Qi173IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi173/Qi173IssueTest.java
index f662bdf..a9a7fba 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi173/Qi173IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi173/Qi173IssueTest.java
@@ -54,7 +54,7 @@ public class Qi173IssueTest
     @Test
     public void testPersistence()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             createCar( "Volvo", "S80", 2007 );
@@ -75,7 +75,7 @@ public class Qi173IssueTest
             e.printStackTrace();
         }
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
         QueryBuilder<Car> qb = queryBuilderFactory.newQueryBuilder( Car.class );
         Car template = QueryExpressions.templateFor( Car.class );
         qb = qb.where( QueryExpressions.eq( template.year(), 2007 ) );
@@ -106,7 +106,7 @@ public class Qi173IssueTest
 
     private String createCar( String manufacturer, String model, int year )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<Car> builder = uow.newEntityBuilder( Car.class );
         Car prototype = builder.instanceFor( Car.class );
         prototype.manufacturer().set( manufacturer );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/AbstractIssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/AbstractIssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/AbstractIssueTest.java
index e6d8d5a..14043d0 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/AbstractIssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/AbstractIssueTest.java
@@ -44,7 +44,7 @@ public abstract class AbstractIssueTest
     protected final String newZestAccount()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<AccountComposite> entityBuilder = work.newEntityBuilder( AccountComposite.class );
         AccountComposite accountComposite = entityBuilder.instance();
         accountComposite.name().set( DEFAULT_ACCOUNT_NAME );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationMandatory/IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationMandatory/IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationMandatory/IssueTest.java
index 84ac6cd..4d1e7fa 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationMandatory/IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationMandatory/IssueTest.java
@@ -56,7 +56,7 @@ public final class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertNull( uowf.currentUnitOfWork() );
+        assertNull( unitOfWorkFactory.currentUnitOfWork() );
 
         accountService.getAccountById( id );
     }
@@ -69,14 +69,14 @@ public final class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
 
-        UnitOfWork parentUnitOfWork = uowf.newUnitOfWork();
+        UnitOfWork parentUnitOfWork = unitOfWorkFactory.newUnitOfWork();
 
         AccountComposite account = accountService.getAccountById( id );
         assertNotNull( account );
 
-        UnitOfWork currentUnitOfWork = uowf.currentUnitOfWork();
+        UnitOfWork currentUnitOfWork = unitOfWorkFactory.currentUnitOfWork();
         assertEquals( parentUnitOfWork, currentUnitOfWork );
 
         assertTrue( currentUnitOfWork.isOpen() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequired/IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequired/IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequired/IssueTest.java
index c63878c..783608b 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequired/IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequired/IssueTest.java
@@ -52,12 +52,12 @@ public final class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
 
         AccountComposite account = accountService.getAccountById( id );
         assertNotNull( account );
 
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
     }
 
     @Test
@@ -68,14 +68,14 @@ public final class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
 
-        UnitOfWork parentUnitOfWork = uowf.newUnitOfWork();
+        UnitOfWork parentUnitOfWork = unitOfWorkFactory.newUnitOfWork();
 
         AccountComposite account = accountService.getAccountById( id );
         assertNotNull( account );
 
-        UnitOfWork currentUnitOfWork = uowf.currentUnitOfWork();
+        UnitOfWork currentUnitOfWork = unitOfWorkFactory.currentUnitOfWork();
         assertEquals( parentUnitOfWork, currentUnitOfWork );
 
         assertTrue( currentUnitOfWork.isOpen() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequiresNew/IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequiresNew/IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequiresNew/IssueTest.java
index 81ef22c..62bf4b3 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequiresNew/IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi64/withPropagationRequiresNew/IssueTest.java
@@ -53,12 +53,12 @@ public class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
 
         AccountComposite account = accountService.getAccountById( id );
         assertNotNull( account );
 
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
     }
 
     @Test
@@ -69,14 +69,14 @@ public class IssueTest
         String id = newZestAccount();
 
         // Make sure there's no unit of work
-        assertFalse( uowf.isUnitOfWorkActive() );
+        assertFalse( unitOfWorkFactory.isUnitOfWorkActive() );
 
-        UnitOfWork parentUnitOfWork = uowf.newUnitOfWork();
+        UnitOfWork parentUnitOfWork = unitOfWorkFactory.newUnitOfWork();
 
         AccountComposite account = accountService.getAccountById( id );
         assertNotNull( account );
 
-        UnitOfWork currentUnitOfWork = uowf.currentUnitOfWork();
+        UnitOfWork currentUnitOfWork = unitOfWorkFactory.currentUnitOfWork();
         assertEquals( parentUnitOfWork, currentUnitOfWork );
 
         assertTrue( currentUnitOfWork.isOpen() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi66/Qi66IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi66/Qi66IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi66/Qi66IssueTest.java
index e930bbb..e39a0fc 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi66/Qi66IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/qi66/Qi66IssueTest.java
@@ -52,7 +52,7 @@ public class Qi66IssueTest
     {
         String accountIdentity = newZestAccount();
 
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         AccountComposite account = work.get( AccountComposite.class, accountIdentity );
         assertNotNull( account );
 
@@ -77,7 +77,7 @@ public class Qi66IssueTest
     private String newZestAccount()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<AccountComposite> entityBuilder = work.newEntityBuilder( AccountComposite.class );
         AccountComposite accountComposite = entityBuilder.instance();
         accountComposite.name().set( ACCOUNT_NAME );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
index 6429056..4b59ac0 100644
--- a/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
+++ b/extensions/indexing-solr/src/test/java/org/apache/zest/index/solr/SolrQueryServiceTest.java
@@ -79,7 +79,7 @@ public class SolrQueryServiceTest
         throws UnitOfWorkCompletionException, InterruptedException
     {
         // Create and index an entity
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         TestEntity test = uow.newEntity( TestEntity.class );
         test.name().set( "Hello World" );
         uow.complete();
@@ -91,7 +91,7 @@ public class SolrQueryServiceTest
         throws UnitOfWorkCompletionException
     {
         // Search for it
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         Query<TestEntity> query = uow.newQuery( queryBuilderFactory.newQueryBuilder( TestEntity.class ).where( SolrExpressions.search( "hello" ) ) );
 
         TestEntity test = query.find();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/indexing-sql/src/test/java/org/apache/zest/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/test/java/org/apache/zest/index/sql/postgresql/PostgreSQLDBIntegrityTest.java b/extensions/indexing-sql/src/test/java/org/apache/zest/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
index e170dd4..b675044 100644
--- a/extensions/indexing-sql/src/test/java/org/apache/zest/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
+++ b/extensions/indexing-sql/src/test/java/org/apache/zest/index/sql/postgresql/PostgreSQLDBIntegrityTest.java
@@ -85,11 +85,11 @@ public class PostgreSQLDBIntegrityTest
     public void createAndRemoveEntityAndVerifyNoExtraDataLeftInDB()
         throws Exception
     {
-        UnitOfWork uow = this.uowf.newUnitOfWork();
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork();
         TestEntity entity = uow.newEntity( TestEntity.class );
         uow.complete();
 
-        uow = this.uowf.newUnitOfWork();
+        uow = this.unitOfWorkFactory.newUnitOfWork();
         entity = uow.get( entity );
         SQLConfiguration config = uow.get( SQLConfiguration.class, PostgreSQLIndexQueryAssembler.DEFAULT_IDENTITY );
         String schemaName = config.schemaName().get();
@@ -132,16 +132,16 @@ public class PostgreSQLDBIntegrityTest
     public void createAndModifyEntity()
         throws Exception
     {
-        UnitOfWork uow = this.uowf.newUnitOfWork();
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork();
         TestEntity entity = uow.newEntity( TestEntity.class );
         uow.complete();
 
-        uow = this.uowf.newUnitOfWork();
+        uow = this.unitOfWorkFactory.newUnitOfWork();
         entity = uow.get( entity );
         entity.testString().set( "NewTestString" );
         uow.complete();
 
-        uow = this.uowf.newUnitOfWork();
+        uow = this.unitOfWorkFactory.newUnitOfWork();
         entity = uow.get( entity );
         Assert.assertEquals( "New value did not store in indexing.", "NewTestString", entity
             .testString().get() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/NoMetricsInstalledTest.java
----------------------------------------------------------------------
diff --git a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/NoMetricsInstalledTest.java b/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/NoMetricsInstalledTest.java
index 05f0ee1..b185899 100644
--- a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/NoMetricsInstalledTest.java
+++ b/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/NoMetricsInstalledTest.java
@@ -63,7 +63,7 @@ public class NoMetricsInstalledTest extends AbstractZestTest
 
     private void readEntity( int id )
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             Person p = uow.get( Person.class, "" + id );
@@ -78,7 +78,7 @@ public class NoMetricsInstalledTest extends AbstractZestTest
     private void createEntity( int id )
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             uow.newEntity( Person.class, "" + id );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/YammerTest.java
----------------------------------------------------------------------
diff --git a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/YammerTest.java b/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/YammerTest.java
index 9042ff1..2d388e6 100644
--- a/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/YammerTest.java
+++ b/extensions/metrics-yammer/src/test/java/org/apache/zest/metrics/yammer/YammerTest.java
@@ -64,7 +64,7 @@ public class YammerTest extends AbstractZestTest
 
     private void readEntity( int id )
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             Person p = uow.get( Person.class, "" + id );
@@ -79,7 +79,7 @@ public class YammerTest extends AbstractZestTest
     private void createEntity( int id )
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             uow.newEntity( Person.class, "" + id );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/reindexer/src/test/java/org/apache/zest/index/reindexer/ReindexerTest.java
----------------------------------------------------------------------
diff --git a/extensions/reindexer/src/test/java/org/apache/zest/index/reindexer/ReindexerTest.java b/extensions/reindexer/src/test/java/org/apache/zest/index/reindexer/ReindexerTest.java
index 18e5d3c..5d082bc 100644
--- a/extensions/reindexer/src/test/java/org/apache/zest/index/reindexer/ReindexerTest.java
+++ b/extensions/reindexer/src/test/java/org/apache/zest/index/reindexer/ReindexerTest.java
@@ -95,7 +95,7 @@ public class ReindexerTest
 
         // ----> Create data and wipe index
 
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         EntityBuilder<MyEntity> eBuilder = uow.newEntityBuilder( MyEntity.class );
         MyEntity e = eBuilder.instance();
@@ -112,7 +112,7 @@ public class ReindexerTest
 
         serviceFinder.findService( ReindexerService.class ).get().reindex(); // Reindex
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
 
         QueryBuilder<MyEntity> qBuilder = queryBuilderFactory.newQueryBuilder( MyEntity.class );
         qBuilder = qBuilder.where( eq( templateFor( MyEntity.class ).name(), TEST_NAME ) );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/valueserialization-jackson/src/test/java/org/apache/zest/valueserialization/jackson/JacksonPlainValueSerializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-jackson/src/test/java/org/apache/zest/valueserialization/jackson/JacksonPlainValueSerializationTest.java b/extensions/valueserialization-jackson/src/test/java/org/apache/zest/valueserialization/jackson/JacksonPlainValueSerializationTest.java
index 9c9d308..091465a 100644
--- a/extensions/valueserialization-jackson/src/test/java/org/apache/zest/valueserialization/jackson/JacksonPlainValueSerializationTest.java
+++ b/extensions/valueserialization-jackson/src/test/java/org/apache/zest/valueserialization/jackson/JacksonPlainValueSerializationTest.java
@@ -33,6 +33,7 @@ public class JacksonPlainValueSerializationTest
         throws AssemblyException
     {
         new JacksonValueSerializationAssembler().assemble( module );
+        super.assemble( module );
     }
     // END SNIPPET: assembly
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmHistoryImplTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmHistoryImplTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmHistoryImplTest.java
index b755071..e53a70e 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmHistoryImplTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmHistoryImplTest.java
@@ -68,16 +68,16 @@ public class AlarmHistoryImplTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        if (uowf.isUnitOfWorkActive())
+        if ( unitOfWorkFactory.isUnitOfWorkActive())
         {
-            UnitOfWork uow = uowf.currentUnitOfWork();
+            UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
             uow.discard();
         }
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmPointImplTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmPointImplTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmPointImplTest.java
index 777fe0c..1768f41 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmPointImplTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmPointImplTest.java
@@ -66,16 +66,16 @@ public class AlarmPointImplTest extends AbstractZestTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        if( uowf.isUnitOfWorkActive() )
+        if( unitOfWorkFactory.isUnitOfWorkActive() )
         {
-            UnitOfWork uow = uowf.currentUnitOfWork();
+            UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
             uow.discard();
         }
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmProxyTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmProxyTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmProxyTest.java
index e2d8657..e14679d 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmProxyTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmProxyTest.java
@@ -55,7 +55,7 @@ public class AlarmProxyTest extends AbstractZestTest
     public void givenAlarmPointWhenActivateExpectActivationEvent()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
 // START SNIPPET: documentation

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmServiceTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmServiceTest.java
index edf0e98..3b95989 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmServiceTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/AlarmServiceTest.java
@@ -69,16 +69,16 @@ public class AlarmServiceTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        if (uowf.isUnitOfWorkActive())
+        if ( unitOfWorkFactory.isUnitOfWorkActive())
         {
-            UnitOfWork uow = uowf.currentUnitOfWork();
+            UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
             uow.discard();
         }
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/ExtendedAlarmModelTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/ExtendedAlarmModelTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/ExtendedAlarmModelTest.java
index 73186c3..6a05ad9 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/ExtendedAlarmModelTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/ExtendedAlarmModelTest.java
@@ -69,14 +69,14 @@ public class ExtendedAlarmModelTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         if( uow != null )
         {
             uow.discard();
@@ -944,7 +944,7 @@ public class ExtendedAlarmModelTest
 
     private AlarmPoint createAlarm( String name )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<AlarmPoint> builder = uow.newEntityBuilder( AlarmPoint.class );
         builder.instance().category().set( createCategory( "Testing" ) );
         AlarmPoint.AlarmState state = builder.instanceFor( AlarmPoint.AlarmState.class );
@@ -963,7 +963,7 @@ public class ExtendedAlarmModelTest
 
     private AlarmPoint getAlarm( String identity )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         return uow.get( AlarmPoint.class, identity );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/SimpleAlarmModelTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/SimpleAlarmModelTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/SimpleAlarmModelTest.java
index 06b5176..da8cac1 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/SimpleAlarmModelTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/SimpleAlarmModelTest.java
@@ -69,14 +69,14 @@ public class SimpleAlarmModelTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         if( uow != null )
         {
             uow.discard();
@@ -329,7 +329,7 @@ public class SimpleAlarmModelTest
 
     private AlarmPoint createAlarm( String name )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<AlarmPoint> builder = uow.newEntityBuilder( AlarmPoint.class );
         builder.instance().category().set( createCategory( "SimpleModelTest" ) );
         AlarmPoint.AlarmState state = builder.instanceFor( AlarmPoint.AlarmState.class );
@@ -348,7 +348,7 @@ public class SimpleAlarmModelTest
 
     private AlarmPoint getAlarm( String identity )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         return uow.get( AlarmPoint.class, identity );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/StandardAlarmModelTest.java
----------------------------------------------------------------------
diff --git a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/StandardAlarmModelTest.java b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/StandardAlarmModelTest.java
index 78167cf..1fd8379 100644
--- a/libraries/alarm/src/test/java/org/apache/zest/library/alarm/StandardAlarmModelTest.java
+++ b/libraries/alarm/src/test/java/org/apache/zest/library/alarm/StandardAlarmModelTest.java
@@ -71,14 +71,14 @@ public class StandardAlarmModelTest
         throws Exception
     {
         super.setUp();
-        uowf.newUnitOfWork();
+        unitOfWorkFactory.newUnitOfWork();
     }
 
     @Override
     public void tearDown()
         throws Exception
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         if( uow != null )
         {
             uow.discard();
@@ -456,7 +456,7 @@ public class StandardAlarmModelTest
 
     private AlarmPoint createAlarm( String name )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<AlarmPoint> builder = uow.newEntityBuilder( AlarmPoint.class );
         builder.instance().category().set( createCategory( "StandardModelTest" ) );
         AlarmPoint.AlarmState state = builder.instanceFor( AlarmPoint.AlarmState.class );
@@ -475,7 +475,7 @@ public class StandardAlarmModelTest
 
     private AlarmPoint getAlarm( String identity )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         return uow.get( AlarmPoint.class, identity );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
index e6ded78..53e5c14 100644
--- a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
+++ b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
@@ -62,7 +62,7 @@ public class EntityToValueTest
     public void whenConvertingEntityToValueExpectCorrectValues()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity entity = setupPersonEntities( uow );
@@ -87,7 +87,7 @@ public class EntityToValueTest
     public void givenUnqualifiedValueWhenConvertingEntityExpectCorrectMapping()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity niclas = setupPersonEntities( uow );
@@ -112,7 +112,7 @@ public class EntityToValueTest
     public void givenUnqualifiedValue2WhenConvertingEntityExpectCorrectMapping()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity niclas = setupPersonEntities( uow );
@@ -137,7 +137,7 @@ public class EntityToValueTest
     public void givenQualifiedValueNotFromSameInterfaceWhenConvertingEntityExpectNonOptionalException()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity niclas = setupPersonEntities( uow );
@@ -158,7 +158,7 @@ public class EntityToValueTest
     public void whenConvertingEntityToValueUsingPrototypeOpportunityExpectCorrectValues()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity entity = setupPersonEntities( uow );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/NestedValuesConversionTest.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/NestedValuesConversionTest.java b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/NestedValuesConversionTest.java
index 5741686..e049c30 100644
--- a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/NestedValuesConversionTest.java
+++ b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/NestedValuesConversionTest.java
@@ -56,7 +56,7 @@ public class NestedValuesConversionTest
     public void testNestedValuesConversion()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             FooEntity fooEntity = createFooEntity( uow, "Test nested values conversion" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/ValueToEntityTest.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/ValueToEntityTest.java b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/ValueToEntityTest.java
index 7e46b18..d88f33f 100644
--- a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/ValueToEntityTest.java
+++ b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/ValueToEntityTest.java
@@ -80,7 +80,7 @@ public class ValueToEntityTest
     {
         // See http://en.wikipedia.org/wiki/Template:Flintstones_family_tree
         someBirthDate = createBirthDate( 1, 1, 1 );
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "InitialData" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "InitialData" ) ) )
         {
             ednaIdentity = createPerson( uow, "Edna", "Flintstone", someBirthDate ).identity().get();
             zekeIdentity = createPerson( uow, "Zeke", "Flintstone", someBirthDate ).identity().get();
@@ -100,7 +100,7 @@ public class ValueToEntityTest
         builder.prototype().spouse().set( ednaIdentity );
         builder.prototype().children().set( Arrays.asList( zekeIdentity, fredIdentity ) );
         PersonValue edValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreatingEntityFromQualifiedValue" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreatingEntityFromQualifiedValue" ) ) )
         {
             // START SNIPPET: creation
             ValueToEntity conversion = serviceFinder.findService( ValueToEntity.class ).get();
@@ -133,7 +133,7 @@ public class ValueToEntityTest
         builder.prototype().spouse().set( ednaIdentity );
         builder.prototype().children().set( Arrays.asList( zekeIdentity, fredIdentity ) );
         PersonValue2 edValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
         {
             ValueToEntity conversion = serviceFinder.findService( ValueToEntity.class ).get();
 
@@ -167,7 +167,7 @@ public class ValueToEntityTest
         builder.prototype().spouse().set( ednaIdentity );
         builder.prototype().children().set( Arrays.asList( zekeIdentity, fredIdentity ) );
         PersonValue3 edValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
         {
             ValueToEntity conversion = serviceFinder.findService( ValueToEntity.class ).get();
 
@@ -201,7 +201,7 @@ public class ValueToEntityTest
         builder.prototype().spouse().set( ednaIdentity );
         builder.prototype().children().set( Arrays.asList( zekeIdentity, fredIdentity ) );
         PersonValue4 edValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreatingEntityFromUnqualifiedValue" ) ) )
         {
             ValueToEntity conversion = serviceFinder.findService( ValueToEntity.class ).get();
 
@@ -217,7 +217,7 @@ public class ValueToEntityTest
         throws UnitOfWorkCompletionException
     {
         String rickyIdentity;
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
         {
             PersonEntity ricky = createPerson( uow, "Ricky", "Slaghople", someBirthDate );
             ricky.spouse().set( uow.get( PersonEntity.class, ednaIdentity ) );
@@ -232,7 +232,7 @@ public class ValueToEntityTest
         builder.prototype().lastName().set( "Slaghoople" );
         builder.prototype().dateOfBirth().set( someBirthDate );
         PersonValue rickyNewStateValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
         {
             PersonEntity rickyEntity = uow.get( PersonEntity.class, rickyIdentity );
             // START SNIPPET: update
@@ -253,7 +253,7 @@ public class ValueToEntityTest
         throws UnitOfWorkCompletionException
     {
         String rickyIdentity;
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
         {
             PersonEntity ricky = createPerson( uow, "Ricky", "Slaghople", someBirthDate );
             ricky.spouse().set( uow.get( PersonEntity.class, ednaIdentity ) );
@@ -268,7 +268,7 @@ public class ValueToEntityTest
         builder.prototype().lastName().set( "Slaghoople" );
         builder.prototype().dateOfBirth().set( someBirthDate );
         PersonValue2 newStateValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
         {
             PersonEntity ricky = uow.get( PersonEntity.class, rickyIdentity );
 
@@ -288,7 +288,7 @@ public class ValueToEntityTest
         throws UnitOfWorkCompletionException
     {
         String rickyIdentity;
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
         {
             PersonEntity ricky = createPerson( uow, "Ricky", "Slaghople", someBirthDate );
             ricky.spouse().set( uow.get( PersonEntity.class, ednaIdentity ) );
@@ -303,7 +303,7 @@ public class ValueToEntityTest
         builder.prototype().lastName().set( "Slaghoople" );
         builder.prototype().dateOfBirth().set( someBirthDate );
         PersonValue3 newStateValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "UpdateRickySlaghoople" ) ) )
         {
             PersonEntity ricky = uow.get( PersonEntity.class, rickyIdentity );
 
@@ -323,7 +323,7 @@ public class ValueToEntityTest
         throws UnitOfWorkCompletionException
     {
         String rickyIdentity;
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "CreateRickySlaghoopleWithTypo" ) ) )
         {
             PersonEntity ricky = createPerson( uow, "Ricky", "Slaghople", someBirthDate );
             ricky.spouse().set( uow.get( PersonEntity.class, ednaIdentity ) );
@@ -338,7 +338,7 @@ public class ValueToEntityTest
         builder.prototype().lastName().set( "Slaghoople" );
         builder.prototype().dateOfBirth().set( someBirthDate );
         PersonValue4 newStateValue = builder.newInstance();
-        try( UnitOfWork uow = uowf.newUnitOfWork( newUsecase( "UpdateRickySlaghoopleWontWork" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( newUsecase( "UpdateRickySlaghoopleWontWork" ) ) )
         {
             PersonEntity ricky = uow.get( PersonEntity.class, rickyIdentity );
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java b/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
index 09769b0..962ef28 100644
--- a/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
+++ b/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
@@ -72,14 +72,14 @@ public class JdbmEventStoreServiceTest
         @Test
         public void testDomainEvent() throws UnitOfWorkCompletionException, IOException
         {
-            UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Create entity" ));
+            UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Create entity" ));
             TestEntity entity = uow.newEntity( TestEntity.class );
             uow.complete();
 
             int count = 10;
             for (int i = 0; i < count; i++)
             {
-                uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
+                uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
                 uow.setMetaInfo( new Principal()
                 {
                     public String getName()

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/application/ApplicationEventTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/application/ApplicationEventTest.java b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/application/ApplicationEventTest.java
index a209bae..fd56c2b 100644
--- a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/application/ApplicationEventTest.java
+++ b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/application/ApplicationEventTest.java
@@ -104,21 +104,21 @@ public class ApplicationEventTest
             }
         };
 
-        UnitOfWork uow1 = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "User signup" ) );
+        UnitOfWork uow1 = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "User signup" ) );
         uow1.setMetaInfo( administratorPrincipal );
         users.signup( null, "user1", Arrays.asList( "news-a", "news-b" ) );
         uow1.complete();
 
         Thread.sleep( 1 ); // For UoWs not getting the same `currentTime`
 
-        UnitOfWork uow2 = uowf.newUnitOfWork();
+        UnitOfWork uow2 = unitOfWorkFactory.newUnitOfWork();
         uow2.setMetaInfo( administratorPrincipal );
         users.signup( null, "user2", Collections.EMPTY_LIST );
         uow2.complete();
 
         Thread.sleep( 1 ); // For UoWs not getting the same `currentTime`
 
-        UnitOfWork uow3 = uowf.newUnitOfWork();
+        UnitOfWork uow3 = unitOfWorkFactory.newUnitOfWork();
         uow3.setMetaInfo( administratorPrincipal );
         users.signup( null, "user3", Collections.singletonList( "news-c" ) );
         uow3.complete();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
index 8652638..036a102 100644
--- a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
+++ b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
@@ -84,7 +84,7 @@ public class DomainEventTest
         };
 
         // Perform UoW with usecase defined
-        UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
         uow.setMetaInfo( administratorPrincipal );
 
         TestEntity entity = uow.newEntity( TestEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
index 0009738..822c814 100644
--- a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
+++ b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
@@ -78,7 +78,7 @@ public class DomainEventTrackerTest
     @Test
     public void testDomainEvent() throws UnitOfWorkCompletionException, IOException
     {
-        UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Change description" ));
         uow.setMetaInfo( new Principal()
         {
             public String getName()

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java b/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
index 6fd79d9..6a66ba7 100644
--- a/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
+++ b/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
@@ -62,7 +62,7 @@ public class DebuggingTest
     @Test
     public void whenCallingMethodThenExpectDebugEntityCreated()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             // There is no Query capability available for Libraries, since that sits in Extensions.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/logging/src/test/java/org/apache/zest/library/logging/TracingTest.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/test/java/org/apache/zest/library/logging/TracingTest.java b/libraries/logging/src/test/java/org/apache/zest/library/logging/TracingTest.java
index f49ae6b..fd5f739 100644
--- a/libraries/logging/src/test/java/org/apache/zest/library/logging/TracingTest.java
+++ b/libraries/logging/src/test/java/org/apache/zest/library/logging/TracingTest.java
@@ -73,7 +73,7 @@ public class TracingTest
         SomeService sc = serviceFinder.findService( SomeService.class ).get();
         assertEquals( 123, sc.doSomethingImportant() );
         assertEquals( 456, sc.doSomethingLessImportant() );
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         QueryBuilder<TraceRecord> builder = queryBuilderFactory.newQueryBuilder( TraceRecord.class );
         Query<TraceRecord> query = uow.newQuery( builder );
         // IS sorting needed??
@@ -94,7 +94,7 @@ public class TracingTest
         SomeService2 sc = serviceFinder.findService( SomeService2.class ).get();
         assertEquals( 123, sc.doSomethingImportant() );
         assertEquals( 456, sc.doSomethingLessImportant() );
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         QueryBuilder<TraceRecord> builder = queryBuilderFactory.newQueryBuilder( TraceRecord.class );
         Query<TraceRecord> query = uow.newQuery( builder );
         // IS sorting needed??
@@ -118,7 +118,7 @@ public class TracingTest
         SomeService sc = serviceFinder.findService( SomeService.class ).get();
         assertEquals( 123, sc.doSomethingImportant() );
         assertEquals( 789, sc.doSomethingModeratelyImportant() );
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             QueryBuilder<TraceRecord> builder = queryBuilderFactory.newQueryBuilder( TraceRecord.class );
@@ -157,7 +157,7 @@ public class TracingTest
         SomeService sc = serviceFinder.findService( SomeService.class ).get();
         assertEquals( 123, sc.doSomethingImportant() );
         assertEquals( 753, sc.doSomethingInsanelyImportant() );
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         QueryBuilder<TraceRecord> builder = queryBuilderFactory.newQueryBuilder( TraceRecord.class );
         Query<TraceRecord> query = uow.newQuery( builder );
         // IS sorting needed??

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntitySerializerTest.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntitySerializerTest.java b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntitySerializerTest.java
index 4de18d9..a172171 100755
--- a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntitySerializerTest.java
+++ b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntitySerializerTest.java
@@ -98,7 +98,7 @@ public class EntitySerializerTest
     void createDummyData()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             ValueBuilder<TestValue> valueBuilder = valueBuilderFactory.newValueBuilder( TestValue.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntityTypeSerializerTest.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntityTypeSerializerTest.java b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntityTypeSerializerTest.java
index a6994a0..c515902 100644
--- a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntityTypeSerializerTest.java
+++ b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/entity/EntityTypeSerializerTest.java
@@ -84,7 +84,7 @@ public class EntityTypeSerializerTest
 
     void createDummyData() throws UnitOfWorkCompletionException
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             ValueBuilder<Test2Value> vb2 = valueBuilderFactory.newValueBuilder( Test2Value.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/rest/src/test/java/org/apache/zest/library/rest/admin/RestTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/test/java/org/apache/zest/library/rest/admin/RestTest.java b/libraries/rest/src/test/java/org/apache/zest/library/rest/admin/RestTest.java
index c38ebc4..dc7f925 100644
--- a/libraries/rest/src/test/java/org/apache/zest/library/rest/admin/RestTest.java
+++ b/libraries/rest/src/test/java/org/apache/zest/library/rest/admin/RestTest.java
@@ -98,7 +98,7 @@ public class RestTest
         throws Exception
     {
         super.setUp();
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<PersonEntity> builder1 = uow.newEntityBuilder( PersonEntity.class, "P2" );
@@ -149,7 +149,7 @@ public class RestTest
         properties.put( "firstname", "Jack" );
         properties.put( "lastname", "Doe" );
         restTester.putEntity( "P1", properties );
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity entity = work.get( PersonEntity.class, "P1" );
@@ -169,7 +169,7 @@ public class RestTest
     {
         RestTester restTester = objectFactory.newObject( RestTester.class );
         restTester.deleteEntity( "P1" );
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity entity = null;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/CronScheduleTest.java
----------------------------------------------------------------------
diff --git a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/CronScheduleTest.java b/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/CronScheduleTest.java
index ac44e92..b62e552 100644
--- a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/CronScheduleTest.java
+++ b/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/CronScheduleTest.java
@@ -48,7 +48,7 @@ public class CronScheduleTest extends AbstractZestTest
         throws Exception
     {
 
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<Task> builder1 = work.newEntityBuilder( Task.class );
         builder1.instance().name().set( "abc" );
         Task task = builder1.newInstance();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/SchedulerTest.java
----------------------------------------------------------------------
diff --git a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/SchedulerTest.java b/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/SchedulerTest.java
index 2baaa59..38b41bf 100644
--- a/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/SchedulerTest.java
+++ b/libraries/scheduler/src/test/java/org/apache/zest/library/scheduler/SchedulerTest.java
@@ -74,14 +74,14 @@ public class SchedulerTest
     {
         Usecase usecase = UsecaseBuilder.newUsecase( "testTask" );
         String taskId;
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             FooTask task = createFooTask( uow, "TestTask", BAZAR );
             taskId = task.identity().get();
             task.run();
             uow.complete();
         }
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             FooTask task = uow.get( FooTask.class, taskId );
             assertThat( task.runCounter().get(), equalTo( 1 ) );
@@ -97,7 +97,7 @@ public class SchedulerTest
         DateTime start = new DateTime();
         String taskIdentity;
         long sleepMillis;
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             Scheduler scheduler = serviceFinder.findService( Scheduler.class ).get();
 
@@ -118,7 +118,7 @@ public class SchedulerTest
             .until( taskOutput( taskIdentity ), equalTo( 1 ) );
 
         //noinspection unused
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             Timeline timeline = serviceFinder.findService( Timeline.class ).get();
             DateTime now = new DateTime();
@@ -154,7 +154,7 @@ public class SchedulerTest
         Schedule schedule2;
         Schedule schedule3;
         Schedule schedule4;
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             FooTask task = createFooTask( uow, usecase.name(), BAZAR );
             taskIdentity = task.identity().get();
@@ -170,7 +170,7 @@ public class SchedulerTest
             .atMost( 6, SECONDS )
             .until( taskOutput( taskIdentity ), equalTo( 4 ) );
 
-        try( UnitOfWork uow = uowf.newUnitOfWork( usecase ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase ) )
         {
             schedule1 = uow.get( schedule1 );
             schedule2 = uow.get( schedule2 );
@@ -194,7 +194,7 @@ public class SchedulerTest
     private Callable<Integer> taskOutput( final String taskIdentity )
     {
         return () -> {
-            try( UnitOfWork uow = uowf.newUnitOfWork() )
+            try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
             {
                 FooTask task = uow.get( FooTask.class, taskIdentity );
                 Integer count = task.runCounter().get();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PasswordDomainTest.java
----------------------------------------------------------------------
diff --git a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PasswordDomainTest.java b/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PasswordDomainTest.java
index 4bceec4..0721e31 100644
--- a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PasswordDomainTest.java
+++ b/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PasswordDomainTest.java
@@ -30,7 +30,6 @@ import org.apache.zest.api.entity.EntityBuilder;
 import org.apache.zest.api.injection.scope.Service;
 import org.apache.zest.api.injection.scope.Structure;
 import org.apache.zest.api.mixin.Mixins;
-import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
@@ -123,7 +122,7 @@ public class PasswordDomainTest
             throws UnitOfWorkCompletionException
     {
 
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         UserFactory userFactory = serviceFinder.findService( UserFactory.class ).get();
         // START SNIPPET: usage
@@ -132,7 +131,7 @@ public class PasswordDomainTest
         // END SNIPPET: usage
         uow.complete();
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
 
         // START SNIPPET: usage
         Subject currentUser = SecurityUtils.getSubject();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PermissionsDomainTest.java
----------------------------------------------------------------------
diff --git a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PermissionsDomainTest.java b/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PermissionsDomainTest.java
index 11a2b28..5684a7c 100644
--- a/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PermissionsDomainTest.java
+++ b/libraries/shiro-core/src/test/java/org/apache/zest/library/shiro/PermissionsDomainTest.java
@@ -31,7 +31,6 @@ import org.apache.zest.api.entity.EntityBuilder;
 import org.apache.zest.api.injection.scope.Service;
 import org.apache.zest.api.injection.scope.Structure;
 import org.apache.zest.api.mixin.Mixins;
-import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
@@ -136,7 +135,7 @@ public class PermissionsDomainTest
             throws UnitOfWorkCompletionException
     {
         // START SNIPPET: usage
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         User user = userFactory.createNewUser( "foo", "bar" );
         Role role = roleFactory.create( "role-one", "permission-one", "permission-two" );
@@ -146,7 +145,7 @@ public class PermissionsDomainTest
 
         // END SNIPPET: usage
         // START SNIPPET: usage
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
 
         Subject currentUser = SecurityUtils.getSubject();
         currentUser.login( new UsernamePasswordToken( "foo", "bar" ) );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFileTest.java
----------------------------------------------------------------------
diff --git a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFileTest.java b/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFileTest.java
index f351b26..82c9510 100644
--- a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFileTest.java
+++ b/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFileTest.java
@@ -192,7 +192,7 @@ public class HasUoWFileTest
         File attachedFile;
 
         // Test discarded creation
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Creation Rollback" );
             attachedFile = entity.attachedFile();
@@ -200,7 +200,7 @@ public class HasUoWFileTest
         assertFalse( "File still exists after discarded creation UoW", attachedFile.exists() );
 
         // Test completed creation
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Creation" );
             attachedFile = entity.attachedFile();
@@ -218,7 +218,7 @@ public class HasUoWFileTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Modification" );
             entityId = entity.identity().get();
@@ -227,14 +227,14 @@ public class HasUoWFileTest
         }
 
         // Testing discarded modification
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testService.modifyFile( entityId );
         }
         assertTrue( "File content after discarded modification was not the good one", isFileFirstLineEqualsTo( attachedFile, "Creation" ) );
 
         // Testing completed modification
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testService.modifyFile( entityId );
             uow.complete();
@@ -251,7 +251,7 @@ public class HasUoWFileTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Deletion" );
             entityId = entity.identity().get();
@@ -260,7 +260,7 @@ public class HasUoWFileTest
         }
 
         // Testing discarded deletion
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = uow.get( TestedEntity.class, entityId );
             uow.remove( entity );
@@ -268,7 +268,7 @@ public class HasUoWFileTest
         assertTrue( "File do not exists after discarded deletion", attachedFile.exists() );
 
         // Testing completed deletion
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = uow.get( TestedEntity.class, entityId );
             uow.remove( entity );
@@ -285,7 +285,7 @@ public class HasUoWFileTest
         final String entityId;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Concurrent Modification" );
             entityId = entity.identity().get();
@@ -296,11 +296,11 @@ public class HasUoWFileTest
         UnitOfWork uow, uow2;
         TestedEntity entity;
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
         entity = uow.get( TestedEntity.class, entityId );
         Inputs.text( MODIFICATION_CONTENT_URL ).transferTo( Outputs.text( entity.managedFile() ) );
 
-        uow2 = uowf.newUnitOfWork();
+        uow2 = unitOfWorkFactory.newUnitOfWork();
         entity = uow2.get( TestedEntity.class, entityId );
         Inputs.text( MODIFICATION_CONTENT_URL ).transferTo( Outputs.text( entity.managedFile() ) );
 
@@ -325,7 +325,7 @@ public class HasUoWFileTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedEntity( uow, "Testing Concurrent Modification" );
             entityId = entity.identity().get();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFilesTest.java
----------------------------------------------------------------------
diff --git a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFilesTest.java b/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFilesTest.java
index fdfa86f..4ea4927 100644
--- a/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFilesTest.java
+++ b/libraries/uowfile/src/test/java/org/apache/zest/library/uowfile/HasUoWFilesTest.java
@@ -34,7 +34,6 @@ import org.apache.zest.api.injection.scope.Structure;
 import org.apache.zest.api.injection.scope.This;
 import org.apache.zest.api.mixin.Mixins;
 import org.apache.zest.api.property.Property;
-import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.api.unitofwork.concern.UnitOfWorkConcern;
@@ -208,7 +207,7 @@ public class HasUoWFilesTest
         File attachedFile;
 
         // Test discarded creation
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Creation Rollback" );
             attachedFile = entity.attachedFile( MyEnum.fileOne );
@@ -216,7 +215,7 @@ public class HasUoWFilesTest
         assertFalse( "File still exists after discarded creation UoW", attachedFile.exists() );
 
         // Test completed creation
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Creation" );
             attachedFile = entity.attachedFile( MyEnum.fileOne );
@@ -234,7 +233,7 @@ public class HasUoWFilesTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Modification" );
             entityId = entity.identity().get();
@@ -243,14 +242,14 @@ public class HasUoWFilesTest
         }
 
         // Testing discarded modification
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testService.modifyFile( entityId );
         }
         assertTrue( "File content after discarded modification was not the good one", isFileFirstLineEqualsTo( attachedFile, "Creation" ) );
 
         // Testing completed modification
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testService.modifyFile( entityId );
             uow.complete();
@@ -267,7 +266,7 @@ public class HasUoWFilesTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Deletion" );
             entityId = entity.identity().get();
@@ -276,7 +275,7 @@ public class HasUoWFilesTest
         }
 
         // Testing discarded deletion
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = uow.get( TestedEntity.class, entityId );
             uow.remove( entity );
@@ -284,7 +283,7 @@ public class HasUoWFilesTest
         assertTrue( "File do not exists after discarded deletion", attachedFile.exists() );
 
         // Testing completed deletion
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = uow.get( TestedEntity.class, entityId );
             uow.remove( entity );
@@ -301,7 +300,7 @@ public class HasUoWFilesTest
         final String entityId;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Concurrent Modification" );
             entityId = entity.identity().get();
@@ -312,11 +311,11 @@ public class HasUoWFilesTest
         UnitOfWork uow, uow2;
         TestedEntity entity;
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
         entity = uow.get( TestedEntity.class, entityId );
         Inputs.text( MODIFICATION_CONTENT_URL ).transferTo( Outputs.text( entity.managedFile( MyEnum.fileOne ) ) );
 
-        uow2 = uowf.newUnitOfWork();
+        uow2 = unitOfWorkFactory.newUnitOfWork();
         entity = uow2.get( TestedEntity.class, entityId );
         Inputs.text( MODIFICATION_CONTENT_URL ).transferTo( Outputs.text( entity.managedFile( MyEnum.fileOne ) ) );
 
@@ -341,7 +340,7 @@ public class HasUoWFilesTest
         File attachedFile;
 
         // Create new
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             TestedEntity entity = createTestedOneEntityTwoFilesEntity( uow, "Testing Concurrent Modification" );
             entityId = entity.identity().get();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/tools/envisage/src/test/java/org/apache/zest/envisage/sample/EnvisageSample.java
----------------------------------------------------------------------
diff --git a/tools/envisage/src/test/java/org/apache/zest/envisage/sample/EnvisageSample.java b/tools/envisage/src/test/java/org/apache/zest/envisage/sample/EnvisageSample.java
index f20e8cc..3a2e50e 100644
--- a/tools/envisage/src/test/java/org/apache/zest/envisage/sample/EnvisageSample.java
+++ b/tools/envisage/src/test/java/org/apache/zest/envisage/sample/EnvisageSample.java
@@ -78,7 +78,7 @@ public class EnvisageSample
 
     public void createTestData()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             createCar( "Volvo", "S80", 2007 );
@@ -104,7 +104,7 @@ public class EnvisageSample
 
     private String createCar( String manufacturer, String model, int year )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<Car> builder = uow.newEntityBuilder( Car.class );
         Car prototype = builder.instanceFor( CarEntity.class );
         prototype.manufacturer().set( manufacturer );
@@ -116,7 +116,7 @@ public class EnvisageSample
 
     private String createAnimal( String name, String sound )
     {
-        UnitOfWork uow = uowf.currentUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
         EntityBuilder<Animal> builder = uow.newEntityBuilder( Animal.class );
         Animal prototype = builder.instanceFor( AnimalEntity.class );
         prototype.name().set( name );


Mime
View raw message