polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [3/3] zest-java git commit: Renamed uowf to unitOfWorkFactory in AbstractZestTestcase
Date Fri, 15 Apr 2016 09:32:01 GMT
Renamed uowf to unitOfWorkFactory in AbstractZestTestcase


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/61427b8a
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/61427b8a
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/61427b8a

Branch: refs/heads/develop
Commit: 61427b8a18423e7714c83b91d35b915dc8e1bacd
Parents: f21cc65
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Fri Apr 15 17:31:29 2016 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Fri Apr 15 17:31:31 2016 +0800

----------------------------------------------------------------------
 .../api/injection/scope/StateFieldTest.java     |  4 +-
 .../zest/api/property/PropertyErrorTest.java    |  2 +-
 .../apache/zest/api/unitofwork/RemovalTest.java |  4 +-
 .../zest/api/value/ValueCompositeTest.java      |  6 +-
 .../apache/zest/api/common/OptionalTest.java    |  6 +-
 .../zest/api/common/PropertyErrorTest.java      |  2 +-
 .../zest/api/common/PropertyTypeTest.java       |  2 +-
 .../org/apache/zest/api/common/RemovalTest.java |  4 +-
 .../zest/api/common/ValueCompositeTest.java     |  2 +-
 ...faceCollisionWithRelatedReturnTypesTest.java | 18 ++---
 .../qi377/SetAssociationInSideEffectTest.java   |  2 +-
 .../apache/zest/regression/qi382/Qi382Test.java |  4 +-
 .../apache/zest/regression/qi383/Qi383Test.java |  2 +-
 .../apache/zest/regression/qi59/IssueTest.java  |  4 +-
 .../apache/zest/regression/qi94/IssueTest.java  |  2 +-
 .../org/apache/zest/runtime/ZestAPITest.java    |  2 +-
 .../org/apache/zest/runtime/ZestSPITest.java    |  6 +-
 .../AppliesToOrConditionQI241Test.java          |  6 +-
 .../association/AssociationAssignmentTest.java  |  4 +-
 .../association/AssociationEqualityTest.java    | 18 ++---
 .../runtime/concerns/GenericConcernTest.java    |  2 +-
 .../zest/runtime/entity/AggregatedTest.java     | 10 +--
 .../entity/EntityBuilderWithStateTest.java      |  4 +-
 .../entity/EntityCompositeEqualityTest.java     |  2 +-
 .../zest/runtime/entity/EntityCreationTest.java |  4 +-
 .../zest/runtime/entity/EntityTypeTest.java     |  2 +-
 .../zest/runtime/entity/LifecycleTest.java      |  4 +-
 .../entity/associations/AssociationTest.java    |  2 +-
 .../associations/ImmutableAssociationTest.java  |  8 +-
 .../injection/UnitOfWorkInjectionTest.java      | 10 +--
 .../zest/runtime/mixin/AssemblyMixinTest.java   |  4 +-
 .../zest/runtime/mixin/AssemblyRoleTest.java    |  4 +-
 .../runtime/property/ImmutablePropertyTest.java |  2 +-
 .../zest/runtime/query/NonQueryableTest.java    |  4 +-
 .../zest/runtime/service/ConfigurationTest.java |  6 +-
 .../unitofwork/AutoCloseableUoWTest.java        |  6 +-
 .../zest/runtime/unitofwork/RemovalTest.java    | 20 ++---
 .../unitofwork/UnitOfWorkFactoryTest.java       |  2 +-
 .../ValueInjectionDeserializationTest.java      |  4 +-
 .../runtime/value/ValueWithAssociationTest.java | 12 +--
 .../org/apache/zest/test/AbstractZestTest.java  |  8 +-
 .../test/entity/AbstractEntityStoreTest.java    | 42 +++++-----
 .../AbstractPlainValueSerializationTest.java    | 80 ++++++++++++++++++++
 ...AbstractValueCompositeSerializationTest.java |  4 +-
 .../sql/DerbySQLEntityStoreTest.java            |  2 +-
 .../entitystore/sql/MySQLEntityStoreTest.java   |  2 +-
 .../sql/PostgreSQLEntityStoreTest.java          |  2 +-
 .../index/elasticsearch/ElasticSearchTest.java  |  4 +-
 .../index/elasticsearch/ImmenseTermTest.java    |  6 +-
 .../apache/zest/index/rdf/ContainsAllTest.java  | 12 +--
 .../org/apache/zest/index/rdf/ContainsTest.java | 12 +--
 .../zest/index/rdf/RDFPerformanceTest.java      | 16 ++--
 .../zest/index/rdf/qi173/Qi173IssueTest.java    |  6 +-
 .../zest/index/rdf/qi64/AbstractIssueTest.java  |  2 +-
 .../withPropagationMandatory/IssueTest.java     |  8 +-
 .../qi64/withPropagationRequired/IssueTest.java | 10 +--
 .../withPropagationRequiresNew/IssueTest.java   | 10 +--
 .../zest/index/rdf/qi66/Qi66IssueTest.java      |  4 +-
 .../zest/index/solr/SolrQueryServiceTest.java   |  4 +-
 .../postgresql/PostgreSQLDBIntegrityTest.java   | 10 +--
 .../metrics/yammer/NoMetricsInstalledTest.java  |  4 +-
 .../apache/zest/metrics/yammer/YammerTest.java  |  4 +-
 .../zest/index/reindexer/ReindexerTest.java     |  4 +-
 .../JacksonPlainValueSerializationTest.java     |  1 +
 .../library/alarm/AlarmHistoryImplTest.java     |  6 +-
 .../zest/library/alarm/AlarmPointImplTest.java  |  6 +-
 .../zest/library/alarm/AlarmProxyTest.java      |  2 +-
 .../zest/library/alarm/AlarmServiceTest.java    |  6 +-
 .../library/alarm/ExtendedAlarmModelTest.java   |  8 +-
 .../library/alarm/SimpleAlarmModelTest.java     |  8 +-
 .../library/alarm/StandardAlarmModelTest.java   |  8 +-
 .../conversion/values/EntityToValueTest.java    | 10 +--
 .../values/NestedValuesConversionTest.java      |  2 +-
 .../conversion/values/ValueToEntityTest.java    | 26 +++----
 .../source/jdbm/JdbmEventStoreServiceTest.java  |  4 +-
 .../application/ApplicationEventTest.java       |  6 +-
 .../eventsourcing/domain/DomainEventTest.java   |  2 +-
 .../source/helper/DomainEventTrackerTest.java   |  2 +-
 .../zest/library/logging/DebuggingTest.java     |  2 +-
 .../zest/library/logging/TracingTest.java       |  8 +-
 .../rdf/entity/EntitySerializerTest.java        |  2 +-
 .../rdf/entity/EntityTypeSerializerTest.java    |  2 +-
 .../zest/library/rest/admin/RestTest.java       |  6 +-
 .../library/scheduler/CronScheduleTest.java     |  2 +-
 .../zest/library/scheduler/SchedulerTest.java   | 14 ++--
 .../zest/library/shiro/PasswordDomainTest.java  |  5 +-
 .../library/shiro/PermissionsDomainTest.java    |  5 +-
 .../zest/library/uowfile/HasUoWFileTest.java    | 24 +++---
 .../zest/library/uowfile/HasUoWFilesTest.java   | 25 +++---
 .../zest/envisage/sample/EnvisageSample.java    |  6 +-
 .../apache/zest/tutorials/hello/HelloTest4.java |  4 +-
 91 files changed, 373 insertions(+), 297 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java b/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
index 6bcfc31..8a9d44f 100644
--- a/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
@@ -52,7 +52,7 @@ public class StateFieldTest
     public void givenEntityWithFieldPropertiesWhenUpdatedThenReturnCorrect()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity charles = unitOfWork.newEntity( PersonEntity.class );
@@ -73,7 +73,7 @@ public class StateFieldTest
 
             unitOfWork.complete();
 
-            unitOfWork = uowf.newUnitOfWork();
+            unitOfWork = unitOfWorkFactory.newUnitOfWork();
 
             charles = unitOfWork.get( charles );
             daniel = unitOfWork.get( daniel );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java b/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
index 103b0bb..ffc1dd6 100644
--- a/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
@@ -46,7 +46,7 @@ public class PropertyErrorTest
     public void givenEntityWithNonOptionPropertyWhenInstantiatedThenException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity person = unitOfWork.newEntity( PersonEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java b/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
index 2d1bbb3..caa8245 100644
--- a/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
@@ -45,7 +45,7 @@ public class RemovalTest
     public void givenEntityIsCreatedAndUnitOfWorkIsNotCompletedWhenEntityIsRemoveThenSuccessfulRemoval()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, "123" );
@@ -64,7 +64,7 @@ public class RemovalTest
     public void givenStandardPidRegulatorWhenNoChangeInInputExpectOutputToGoTowardsMinimum()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         PidRegulator regulator = null;
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java b/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
index 4fa5edc..2625da8 100644
--- a/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
@@ -190,7 +190,7 @@ public class ValueCompositeTest
         builder.prototype().number().set( 42L );
         SomeValue some = builder.newInstance();
 
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<SomeEntity> entityBuilder = unitOfWork.newEntityBuilder( SomeEntity.class );
@@ -219,7 +219,7 @@ public class ValueCompositeTest
         builder.prototype().number().set( 42L );
         SomeValue some = builder.newInstance();
 
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         AssociationValue associationValue;
         try
         {
@@ -235,7 +235,7 @@ public class ValueCompositeTest
 
             unitOfWork.complete();
 
-            unitOfWork = uowf.newUnitOfWork();
+            unitOfWork = unitOfWorkFactory.newUnitOfWork();
 
             AssociationValue newAssociationValue = valueBuilderFactory.newValueFromSerializedState( AssociationValue.class, json );
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/api/common/OptionalTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/api/common/OptionalTest.java b/core/runtime/src/test/java/org/apache/zest/api/common/OptionalTest.java
index c851372..823b398 100644
--- a/core/runtime/src/test/java/org/apache/zest/api/common/OptionalTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/api/common/OptionalTest.java
@@ -101,7 +101,7 @@ public class OptionalTest
     public void givenOptionalAssociationWhenOptionalMissingThenNoException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             TestComposite4 ref = unitOfWork.newEntity( TestComposite4.class );
@@ -122,7 +122,7 @@ public class OptionalTest
     public void givenOptionalAssociationWhenOptionalSetThenNoException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             TestComposite4 ref = unitOfWork.newEntity( TestComposite4.class );
@@ -144,7 +144,7 @@ public class OptionalTest
     public void givenMandatoryAssociationWhenMandatoryMissingThenException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             TestComposite4 ref = unitOfWork.newEntity( TestComposite4.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyErrorTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyErrorTest.java b/core/runtime/src/test/java/org/apache/zest/api/common/PropertyErrorTest.java
index 1b637bc..309596a 100644
--- a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyErrorTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/api/common/PropertyErrorTest.java
@@ -47,7 +47,7 @@ public class PropertyErrorTest
     public void givenEntityWithNonOptionPropertyWhenInstantiatedThenException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity person = unitOfWork.newEntity( PersonEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyTypeTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyTypeTest.java b/core/runtime/src/test/java/org/apache/zest/api/common/PropertyTypeTest.java
index 0f86248..f352bd5 100644
--- a/core/runtime/src/test/java/org/apache/zest/api/common/PropertyTypeTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/api/common/PropertyTypeTest.java
@@ -55,7 +55,7 @@ public class PropertyTypeTest
     public void givenEntityWithPropertyConstraintsWhenInstantiatedThenPropertiesWork()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/api/common/RemovalTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/api/common/RemovalTest.java b/core/runtime/src/test/java/org/apache/zest/api/common/RemovalTest.java
index abe2fb4..18d662b 100644
--- a/core/runtime/src/test/java/org/apache/zest/api/common/RemovalTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/api/common/RemovalTest.java
@@ -46,7 +46,7 @@ public class RemovalTest
     public void givenEntityIsCreatedAndUnitOfWorkIsNotCompletedWhenEntityIsRemoveThenSuccessfulRemoval()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class, "123" );
         builder.instance().test().set( "habba" );
         TestEntity test = builder.newInstance();
@@ -58,7 +58,7 @@ public class RemovalTest
     public void givenStandardPidRegulatorWhenNoChangeInInputExpectOutputToGoTowardsMinimum()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         PidRegulator regulator = null;
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/api/common/ValueCompositeTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/api/common/ValueCompositeTest.java b/core/runtime/src/test/java/org/apache/zest/api/common/ValueCompositeTest.java
index 66a4c84..44d4dd7 100644
--- a/core/runtime/src/test/java/org/apache/zest/api/common/ValueCompositeTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/api/common/ValueCompositeTest.java
@@ -189,7 +189,7 @@ public class ValueCompositeTest
         builder.prototype().number().set( 42L );
         SomeValue some = builder.newInstance();
 
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<SomeEntity> entityBuilder = unitOfWork.newEntityBuilder( SomeEntity.class );
         entityBuilder.instance().someValue().set( some );
         SomeEntity entity = entityBuilder.newInstance();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java b/core/runtime/src/test/java/org/apache/zest/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
index 90b2dfd..e460e0e 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
@@ -53,14 +53,14 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
         throws UnitOfWorkCompletionException
     {
         String identity;
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Company startUp = uow.newEntity( Company.class );
             startUp.name().set( "Acme" );
             identity = ( (Identity) startUp ).identity().get();
             uow.complete();
         }
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Company startUp = uow.get( Company.class, identity );
             assertThat( startUp.name().get(), equalTo( "Acme" ) );
@@ -78,7 +78,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
         throws UnitOfWorkCompletionException
     {
         String identity;
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Company startUp = uow.newEntity( Company.class );
             Employee niclas = uow.newEntity( Employee.class );
@@ -88,7 +88,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
 
             uow.complete();
         }
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Company startUp = uow.get( Company.class, identity );
             Employee niclas = startUp.lead().get();
@@ -105,7 +105,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToSetLeadToTheSalesTeam()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             SalesTeam startUp = uow.newEntity( SalesTeam.class );
             Employee niclas = uow.newEntity( Employee.class );
@@ -117,7 +117,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToSetLeadToTheResearchTeam()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             ResearchTeam startUp = uow.newEntity( ResearchTeam.class );
             Employee niclas = uow.newEntity( Employee.class );
@@ -129,7 +129,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToAddEmployeesToTheCompany()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             Company startUp = uow.newEntity( Company.class );
             Employee niclas = uow.newEntity( Employee.class );
@@ -143,7 +143,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToAddEmployeesToTheSalesTeam()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             SalesTeam startUp = uow.newEntity( SalesTeam.class );
             Employee niclas = uow.newEntity( Employee.class );
@@ -155,7 +155,7 @@ public class InterfaceCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToAddEmployeesToTheResearchTeam()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             ResearchTeam startUp = uow.newEntity( ResearchTeam.class );
             Employee niclas = uow.newEntity( Employee.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi377/SetAssociationInSideEffectTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi377/SetAssociationInSideEffectTest.java b/core/runtime/src/test/java/org/apache/zest/regression/qi377/SetAssociationInSideEffectTest.java
index 3613080..3d444d7 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi377/SetAssociationInSideEffectTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi377/SetAssociationInSideEffectTest.java
@@ -58,7 +58,7 @@ public class SetAssociationInSideEffectTest
     @Test
     public void whenSettingAnAssociationInASideEffectExpectItToWork()
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Purchase Steinway" ) ) )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Purchase Steinway" ) ) )
         {
             Pianist chris = uow.newEntity( Pianist.class, "Chris" );
             Steinway modelD = uow.newEntity( Steinway.class, "ModelD-274" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi382/Qi382Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi382/Qi382Test.java b/core/runtime/src/test/java/org/apache/zest/regression/qi382/Qi382Test.java
index 43c4ba4..9e2c860 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi382/Qi382Test.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi382/Qi382Test.java
@@ -58,12 +58,12 @@ public class Qi382Test extends AbstractZestTest
     public void givenCreationOfTwoEntitiesWhenAssigningOneToOtherExpectCompletionToSucceed()
         throws UnitOfWorkCompletionException
     {
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork() )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
             Car car = unitOfWork.newEntity( Car.class, "Ferrari" );
             unitOfWork.complete();
         }
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork() )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
             Car car = unitOfWork.get( Car.class, "Ferrari" );
             assertThat( car, notNullValue() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi383/Qi383Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi383/Qi383Test.java b/core/runtime/src/test/java/org/apache/zest/regression/qi383/Qi383Test.java
index 09ac135..0603d03 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi383/Qi383Test.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi383/Qi383Test.java
@@ -46,7 +46,7 @@ public class Qi383Test extends AbstractZestTest
     public void givenUnitOfWorkInProgressWhenAddingSameEntityTwiceExpectException()
         throws UnitOfWorkCompletionException
     {
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork() )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork() )
         {
             unitOfWork.newEntity( Car.class, "Ferrari" );
             unitOfWork.newEntity( Car.class, "Ford" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi59/IssueTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi59/IssueTest.java b/core/runtime/src/test/java/org/apache/zest/regression/qi59/IssueTest.java
index abcb080..cde289a 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi59/IssueTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi59/IssueTest.java
@@ -48,7 +48,7 @@ public class IssueTest
     @Test
     public void givenEntityWithConstrainedPropertyWhenInvalidPropertyValueSetThenThrowException()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         try
         {
@@ -68,7 +68,7 @@ public class IssueTest
     @Test
     public void givenEntityWithComplexConstrainedPropertyWhenInvalidPropertyValueSetThenThrowException()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/regression/qi94/IssueTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/regression/qi94/IssueTest.java b/core/runtime/src/test/java/org/apache/zest/regression/qi94/IssueTest.java
index f912ff2..e1db0c8 100644
--- a/core/runtime/src/test/java/org/apache/zest/regression/qi94/IssueTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/regression/qi94/IssueTest.java
@@ -46,7 +46,7 @@ public class IssueTest
     @Test
     public void entityBuilderAssociationTypeIsNotNull()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Item> builder = uow.newEntityBuilder( Item.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/ZestAPITest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/ZestAPITest.java b/core/runtime/src/test/java/org/apache/zest/runtime/ZestAPITest.java
index 1350594..bcb8028 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/ZestAPITest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/ZestAPITest.java
@@ -51,7 +51,7 @@ public class ZestAPITest
     public void testGetModuleOfComposite()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         TestEntity testEntity = unitOfWork.newEntity( TestEntity.class );
 
         api.moduleOf( testEntity );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/ZestSPITest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/ZestSPITest.java b/core/runtime/src/test/java/org/apache/zest/runtime/ZestSPITest.java
index c09cbe6..9ca341b 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/ZestSPITest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/ZestSPITest.java
@@ -24,7 +24,6 @@ import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 import org.apache.zest.api.association.AbstractAssociation;
 import org.apache.zest.api.association.Association;
-import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateDescriptor;
 import org.apache.zest.api.association.AssociationStateHolder;
 import org.apache.zest.api.association.ManyAssociation;
@@ -33,7 +32,6 @@ import org.apache.zest.api.entity.EntityBuilder;
 import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.entity.EntityDescriptor;
 import org.apache.zest.api.property.Property;
-import org.apache.zest.api.property.PropertyDescriptor;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -59,7 +57,7 @@ public class ZestSPITest
     public void givenEntityWhenGettingStateThenGetCorrectState()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         TestEntity testEntity;
         try
         {
@@ -78,7 +76,7 @@ public class ZestSPITest
             unitOfWork.discard();
         }
 
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             testEntity = uow.get( testEntity );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/appliesto/AppliesToOrConditionQI241Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/appliesto/AppliesToOrConditionQI241Test.java b/core/runtime/src/test/java/org/apache/zest/runtime/appliesto/AppliesToOrConditionQI241Test.java
index 3a342b1..de0b6f8 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/appliesto/AppliesToOrConditionQI241Test.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/appliesto/AppliesToOrConditionQI241Test.java
@@ -58,7 +58,7 @@ public class AppliesToOrConditionQI241Test
     @Test
     public void testMultiConcerns1()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         try
         {
@@ -77,7 +77,7 @@ public class AppliesToOrConditionQI241Test
     @Test
     public void testMultiConcerns2()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         try
         {
@@ -96,7 +96,7 @@ public class AppliesToOrConditionQI241Test
     @Test
     public void testMultiConcernsBoth()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
 
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationAssignmentTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationAssignmentTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationAssignmentTest.java
index face1c4..c76d098 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationAssignmentTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationAssignmentTest.java
@@ -56,7 +56,7 @@ public class AssociationAssignmentTest extends AbstractZestTest
     public void givenAssignmentOfAssociationAtCreationWhenDereferencingAssocationExpectCorrectValue()
         throws Exception
     {
-        UnitOfWork work = uowf.newUnitOfWork();
+        UnitOfWork work = unitOfWorkFactory.newUnitOfWork();
         TheAssociatedType entity1 = work.newEntity( TheAssociatedType.class );
         EntityBuilder<TheMainType> builder = work.newEntityBuilder( TheMainType.class );
         builder.instance().assoc().set( entity1 );
@@ -67,7 +67,7 @@ public class AssociationAssignmentTest extends AbstractZestTest
         assertThat(id1, notNullValue());
         assertThat(id2, notNullValue());
 
-        work = uowf.newUnitOfWork();
+        work = unitOfWorkFactory.newUnitOfWork();
         TheMainType entity3 = work.get(TheMainType.class, id2 );
         TheAssociatedType entity4 = entity3.assoc().get();
         assertThat( entity4.identity().get(), equalTo(id1));

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationEqualityTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationEqualityTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationEqualityTest.java
index 0dbaf57..2245516 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationEqualityTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/association/AssociationEqualityTest.java
@@ -87,7 +87,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfTheSameTypeAndSameStateWhenTestingAssociationDescriptorEqualityExpectEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             AnEntity anEntity = uow.newEntity( AnEntity.class );
@@ -130,7 +130,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfTheSameTypeAndDifferentStateWhenTestingAssociationDescriptorEqualityExpectEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             SomeWithAssociations some = buildSomeWithAssociation( uow.newEntity( AnEntity.class ) );
@@ -171,7 +171,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfDifferentTypeAndSameStateWhenTestingAssociationDescriptorEqualityExpectNotEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             AnEntity anEntity = uow.newEntity( AnEntity.class );
@@ -217,7 +217,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfSameTypeAndDifferentStateWhenTestingAssociationStateEqualityExpectNotEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             SomeWithAssociations some = buildSomeWithAssociation( uow.newEntity( AnEntity.class ) );
@@ -251,7 +251,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfDifferentTypesAndSameStateWhenTestingAssociationStateEqualityExpectEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             AnEntity anEntity = uow.newEntity( AnEntity.class );
@@ -290,7 +290,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfTheSameTypeAndSameStateWhenTestingAssociationEqualityExpectEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             AnEntity anEntity = uow.newEntity( AnEntity.class );
@@ -326,7 +326,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfTheSameTypeAndDifferentStateWhenTestingAssociationEqualityExpectNotEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             SomeWithAssociations some = buildSomeWithAssociation( uow.newEntity( AnEntity.class ) );
@@ -360,7 +360,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfDifferentTypesAndSameStateWhenTestingAssociationEqualityExpectNotEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             AnEntity anEntity = uow.newEntity( AnEntity.class );
@@ -396,7 +396,7 @@ public class AssociationEqualityTest
     @Test
     public void givenValuesOfDifferentTypesAndDifferentStateWhenTestingAssociationEqualityExpectNotEquals()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             SomeWithAssociations some = buildSomeWithAssociation( uow.newEntity( AnEntity.class ) );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/concerns/GenericConcernTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/concerns/GenericConcernTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/concerns/GenericConcernTest.java
index c5fd04b..baf9d6e 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/concerns/GenericConcernTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/concerns/GenericConcernTest.java
@@ -48,7 +48,7 @@ public class GenericConcernTest
     @Test
     public void testNestedUnitOfWork()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         Some some = transientBuilderFactory.newTransient( Some.class );
         some.doStuff();
         uow.discard();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/AggregatedTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/AggregatedTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/AggregatedTest.java
index 4a52db9..c514801 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/AggregatedTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/AggregatedTest.java
@@ -60,7 +60,7 @@ public class AggregatedTest
         CompanyEntity companyEntity;
         PersonEntity personEntity, personEntity2;
         EmployeeEntity employeeEntity, employeeEntity2;
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Creation" ) ) )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Creation" ) ) )
         {
             {
                 EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
@@ -106,7 +106,7 @@ public class AggregatedTest
             unitOfWork.complete();
         }
 
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Removal" ) ) )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Removal" ) ) )
         {
             companyEntity = unitOfWork.get( companyEntity );
             unitOfWork.remove( companyEntity );
@@ -114,7 +114,7 @@ public class AggregatedTest
             unitOfWork.complete();
         }
 
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "No 1st employee" ) ) )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "No 1st employee" ) ) )
         {
             unitOfWork.get( employeeEntity );
             fail( "Should not work" );
@@ -124,7 +124,7 @@ public class AggregatedTest
             // Expected
         }
 
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "No 2nd employee" ) ) )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "No 2nd employee" ) ) )
         {
             unitOfWork.get( employeeEntity2 );
             fail( "Should not work" );
@@ -134,7 +134,7 @@ public class AggregatedTest
             // Expected
         }
 
-        try( UnitOfWork unitOfWork = uowf.newUnitOfWork( UsecaseBuilder.newUsecase( "Persons not removed" ) ) )
+        try( UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Persons not removed" ) ) )
         {
             unitOfWork.get( personEntity );
             unitOfWork.get( personEntity2 );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityBuilderWithStateTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityBuilderWithStateTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityBuilderWithStateTest.java
index b860605..fa04a99 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityBuilderWithStateTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityBuilderWithStateTest.java
@@ -61,7 +61,7 @@ public class EntityBuilderWithStateTest
         throws UnitOfWorkCompletionException
     {
         final String associatedIdentity;
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             EntityBuilder<SomeEntity> builder = uow.newEntityBuilder( SomeEntity.class );
             builder.instance().prop().set( "Associated" );
@@ -69,7 +69,7 @@ public class EntityBuilderWithStateTest
             associatedIdentity = entity.identity().get();
             uow.complete();
         }
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             SomeEntity entity = uow.newEntityBuilderWithState(
                 SomeEntity.class,

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCompositeEqualityTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCompositeEqualityTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCompositeEqualityTest.java
index aeb99d3..4499ead 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCompositeEqualityTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCompositeEqualityTest.java
@@ -50,7 +50,7 @@ public class EntityCompositeEqualityTest
         throws Exception
     {
         super.setUp();
-        unitOfWork = this.uowf.newUnitOfWork();
+        unitOfWork = this.unitOfWorkFactory.newUnitOfWork();
         myCompositeBuilder = unitOfWork.newEntityBuilder( MyComposite.class );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCreationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCreationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCreationTest.java
index c3a8be5..f9865e6 100755
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCreationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityCreationTest.java
@@ -84,7 +84,7 @@ public class EntityCreationTest
     @Test
     public void doTestUseUowNewEntity()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         SomeEntity entity = uow.newEntity( SomeEntity.class );
         uow.discard();
     }
@@ -92,7 +92,7 @@ public class EntityCreationTest
     @Test
     public void doTestUseEntityBuilder()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<SomeEntity> builder = uow.newEntityBuilder( SomeEntity.class );
         SomeEntity entity = builder.newInstance();
         uow.discard();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityTypeTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityTypeTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityTypeTest.java
index 121a7d7..6dc87ba 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityTypeTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/EntityTypeTest.java
@@ -36,7 +36,7 @@ public class EntityTypeTest
     public void givenSubclassedEntityWhenRequestingSuperclassExpectResolutionToWork()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Rst> builder3 = uow.newEntityBuilder( Rst.class, "123" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/LifecycleTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/LifecycleTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/LifecycleTest.java
index b551a94..b9f5c2d 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/LifecycleTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/LifecycleTest.java
@@ -56,7 +56,7 @@ public class LifecycleTest
     public void whenEntityHasLifecycleWhenInstantiatedThenInvokeCreate()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
@@ -75,7 +75,7 @@ public class LifecycleTest
     public void whenEntityHasLifecycleWhenRemovedThenInvokeRemove()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/AssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/AssociationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/AssociationTest.java
index ab4c376..2f575f3 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/AssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/AssociationTest.java
@@ -58,7 +58,7 @@ public class AssociationTest
     @Test
     public void testAssociation()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
 
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/ImmutableAssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/ImmutableAssociationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/ImmutableAssociationTest.java
index 597a57d..352d53b 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/ImmutableAssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/entity/associations/ImmutableAssociationTest.java
@@ -50,7 +50,7 @@ public class ImmutableAssociationTest
     public void givenEntityWithImmutableAssociationWhenBuildingThenNoException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             PersonEntity father = unitOfWork.newEntity( PersonEntity.class );
@@ -70,7 +70,7 @@ public class ImmutableAssociationTest
     public void givenEntityWithImmutableAssociationWhenChangingValueThenThrowException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
@@ -95,7 +95,7 @@ public class ImmutableAssociationTest
     public void givenEntityWithImmutableManyAssociationWhenBuildingThenNoException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
@@ -117,7 +117,7 @@ public class ImmutableAssociationTest
     public void givenEntityWithImmutableManyAssociationWhenChangingValueThenThrowException()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/injection/UnitOfWorkInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/injection/UnitOfWorkInjectionTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/injection/UnitOfWorkInjectionTest.java
index 1434e25..0efadf5 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/injection/UnitOfWorkInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/injection/UnitOfWorkInjectionTest.java
@@ -49,15 +49,15 @@ public class UnitOfWorkInjectionTest
         throws Exception
     {
         Usecase usecase = UsecaseBuilder.newUsecase( "usecase1" );
-        UnitOfWork uow = uowf.newUnitOfWork( usecase );
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( usecase );
         try
         {
             Trial trial = uow.newEntity( Trial.class, "123" );
             trial.doSomething();
             uow.complete();
-            uow = uowf.newUnitOfWork( usecase );
+            uow = unitOfWorkFactory.newUnitOfWork( usecase );
             usecase = UsecaseBuilder.newUsecase( "usecase2" );
-            UnitOfWork uow2 = uowf.newUnitOfWork( usecase );
+            UnitOfWork uow2 = unitOfWorkFactory.newUnitOfWork( usecase );
             trial = uow.get( trial );
             trial.doSomething();
             assertEquals( "123", ( (EntityComposite) trial ).identity().get() );
@@ -72,9 +72,9 @@ public class UnitOfWorkInjectionTest
         {
             try
             {
-                while( uowf.isUnitOfWorkActive() )
+                while( unitOfWorkFactory.isUnitOfWorkActive() )
                 {
-                    uow = uowf.currentUnitOfWork();
+                    uow = unitOfWorkFactory.currentUnitOfWork();
                     uow.discard();
                 }
             }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyMixinTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyMixinTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyMixinTest.java
index 22f7a18..5926417 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyMixinTest.java
@@ -60,11 +60,11 @@ public class AssemblyMixinTest
     public void testAssemblyMixinsEntity()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         FooEntity entity = uow.newEntity( FooEntity.class, "123" );
         uow.complete();
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
         Foo foo = uow.get( Foo.class, "123" );
 
         try

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyRoleTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyRoleTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyRoleTest.java
index a472643..972f212 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyRoleTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/mixin/AssemblyRoleTest.java
@@ -69,11 +69,11 @@ public class AssemblyRoleTest
     public void testAssemblyMixinsEntity()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         uow.newEntity( FooEntity.class, "123" );
         uow.complete();
 
-        uow = uowf.newUnitOfWork();
+        uow = unitOfWorkFactory.newUnitOfWork();
         Foo foo = uow.get( Foo.class, "123" );
 
         try

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/property/ImmutablePropertyTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/property/ImmutablePropertyTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/property/ImmutablePropertyTest.java
index d7a233c..c635316 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/property/ImmutablePropertyTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/property/ImmutablePropertyTest.java
@@ -86,7 +86,7 @@ public final class ImmutablePropertyTest
     @Test
     public final void testImmutableEntityProperty()
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<LocationEntity> builder = uow.newEntityBuilder( LocationEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/query/NonQueryableTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/query/NonQueryableTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/query/NonQueryableTest.java
index 296ebbb..a72d8b4 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/query/NonQueryableTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/query/NonQueryableTest.java
@@ -44,7 +44,7 @@ public class NonQueryableTest
     @Test
     public void whenQuerableIsFalseOnPropertyThenExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             QueryBuilder<Abc> builder = queryBuilderFactory.newQueryBuilder( Abc.class );
@@ -65,7 +65,7 @@ public class NonQueryableTest
     @Test
     public void testQueryIterable()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             queryBuilderFactory.newQueryBuilder( Abc2.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/service/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/service/ConfigurationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/service/ConfigurationTest.java
index 34d6ec9..68040d9 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/service/ConfigurationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/service/ConfigurationTest.java
@@ -61,7 +61,7 @@ public class ConfigurationTest
     public void whenConfiguredThenSayHelloWorks()
         throws Exception
     {
-        UnitOfWork unit = uowf.newUnitOfWork();
+        UnitOfWork unit = unitOfWorkFactory.newUnitOfWork();
         EntityBuilder<HelloWorldConfiguration> entityBuilder = unit.newEntityBuilder( HelloWorldConfiguration.class, service
             .identity() );
         HelloWorldConfiguration config = entityBuilder.instance();
@@ -87,7 +87,7 @@ public class ConfigurationTest
         HelloWorldConfiguration config;
 
         {
-            UnitOfWork unit = uowf.newUnitOfWork();
+            UnitOfWork unit = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<HelloWorldConfiguration> entityBuilder = unit.newEntityBuilder( HelloWorldConfiguration.class, service
                 .identity() );
             config = entityBuilder.instance();
@@ -100,7 +100,7 @@ public class ConfigurationTest
         assertThat( "result is correct", service.get().sayHello(), equalTo( "Hello World" ) );
 
         {
-            UnitOfWork unit = uowf.newUnitOfWork();
+            UnitOfWork unit = unitOfWorkFactory.newUnitOfWork();
             config = unit.get( config );
             config.phrase().set( "Hey" );
             config.name().set( "Universe" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/AutoCloseableUoWTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/AutoCloseableUoWTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/AutoCloseableUoWTest.java
index 0f16a6c..89b12cf 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/AutoCloseableUoWTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/AutoCloseableUoWTest.java
@@ -60,7 +60,7 @@ public class AutoCloseableUoWTest
     public void givenGoodAutoCloseableUoWWhenTryWithResourceExpectSuccess()
         throws UnitOfWorkCompletionException
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             EntityBuilder<TestEntity> builder = uow.newEntityBuilder( TestEntity.class );
             builder.instance().mandatory().set( "Mandatory property" );
@@ -73,7 +73,7 @@ public class AutoCloseableUoWTest
     public void givenWrongAutoCloseableUoWWhenTryWithResourceExpectSuccess()
         throws UnitOfWorkCompletionException
     {
-        try( UnitOfWork uow = uowf.newUnitOfWork() )
+        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             uow.newEntity( TestEntity.class );
             uow.complete();
@@ -83,7 +83,7 @@ public class AutoCloseableUoWTest
     @After
     public void afterEachTest()
     {
-        assertThat( uowf.isUnitOfWorkActive(), is( false ) );
+        assertThat( unitOfWorkFactory.isUnitOfWorkActive(), is( false ) );
     }
 
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/RemovalTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/RemovalTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/RemovalTest.java
index 5a4acc1..485b185 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/RemovalTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/RemovalTest.java
@@ -48,14 +48,14 @@ public class RemovalTest
     public void givenUnitOfWorkHasBeenCreateWhenCreatingNewEntityThenFindNewEntityWithGet()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Abc> builder = uow.newEntityBuilder( Abc.class, "123" );
             builder.instance().name().set( "Niclas" );
             builder.newInstance();
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             Abc abc = uow.get( Abc.class, "123" );
             assertEquals( "Niclas", abc.name().get() );
         }
@@ -69,19 +69,19 @@ public class RemovalTest
     public void givenEntityCreatedWhenRemovingEntityThenFindNewEntityShouldNotExist()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Abc> builder = uow.newEntityBuilder( Abc.class, "123" );
             builder.instance().name().set( "Niclas" );
             builder.newInstance();
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             Abc abc = uow.get( Abc.class, "123" );
             assertEquals( "Niclas", abc.name().get() );
             uow.remove( abc );
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             uow.get( Abc.class, "123" );
             fail( "This '123' entity should not exist." );
         }
@@ -99,18 +99,18 @@ public class RemovalTest
     public void givenDetachedEntityWhenRemovingEntityThenFindNewEntityShouldNotExist()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Abc> builder = uow.newEntityBuilder( Abc.class, "123" );
             builder.instance().name().set( "Niclas" );
             Abc abc = builder.newInstance();
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             abc = uow.get( abc );  // Attach the detached entity to 'uow' session.
             uow.remove( abc );
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             uow.get( Abc.class, "123" );
             fail( "This '123' entity should not exist." );
         }
@@ -128,7 +128,7 @@ public class RemovalTest
     public void givenEntityCreatedWhenRemovingEntityBeforeCompletingUowThenFindNewEntityShouldNotExist()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             EntityBuilder<Abc> builder = uow.newEntityBuilder( Abc.class, "123" );
@@ -136,7 +136,7 @@ public class RemovalTest
             Abc abc = builder.newInstance();
             uow.remove( abc );
             uow.complete();
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             uow.get( Abc.class, "123" );
             fail( "This '123' entity should not exist." );
         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/UnitOfWorkFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/UnitOfWorkFactoryTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/UnitOfWorkFactoryTest.java
index b6fdb0b..4b1be19 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/UnitOfWorkFactoryTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/unitofwork/UnitOfWorkFactoryTest.java
@@ -52,7 +52,7 @@ public class UnitOfWorkFactoryTest
     public void testUnitOfWork()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
 
         // Create product
         EntityBuilder<ProductEntity> cb = unitOfWork.newEntityBuilder( ProductEntity.class );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueInjectionDeserializationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueInjectionDeserializationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueInjectionDeserializationTest.java
index e48b31f..2567f18 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueInjectionDeserializationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueInjectionDeserializationTest.java
@@ -62,14 +62,14 @@ public class ValueInjectionDeserializationTest
             builder.prototype().data().set( "Niclas" );
             Some value = builder.newInstance();
 
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<Niclas> eb = uow.newEntityBuilder( Niclas.class );
             eb.instance().value().set( value );
             Niclas niclas1 = eb.newInstance();
             String id = niclas1.identity().get();
             uow.complete();
 
-            uow = uowf.newUnitOfWork();
+            uow = unitOfWorkFactory.newUnitOfWork();
             Niclas niclas2 = uow.get( Niclas.class, id );
             Some someValue = niclas2.value().get();
             Assert.assertEquals( someValue.data().get(), "Niclas" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java
index 57da596..1e3dcad 100644
--- a/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/runtime/value/ValueWithAssociationTest.java
@@ -66,7 +66,7 @@ public class ValueWithAssociationTest extends AbstractZestTest
         String identity1;
         String identity2;
         DualFaced value;
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             EntityBuilder<SimpleName> builder1 = uow.newEntityBuilder( SimpleName.class );
             builder1.instance().name().set( "Niclas" );
@@ -86,7 +86,7 @@ public class ValueWithAssociationTest extends AbstractZestTest
             uow.complete();
         }
 
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             DualFaced entity = uow.get( DualFaced.class, identity2 );
             AssociationStateHolder holder = spi.stateOf( (EntityComposite) entity );
@@ -119,13 +119,13 @@ public class ValueWithAssociationTest extends AbstractZestTest
         builder.prototype().name().set( "Hedhman" );
         DualFaced value = builder.newInstance();
 
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             uow.toEntity( DualFaced.class, value );
             uow.complete();
         }
 
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             DualFaced entity = uow.get( DualFaced.class, "1234" );
             assertThat( entity.identity().get(), equalTo( "1234" ) );
@@ -140,7 +140,7 @@ public class ValueWithAssociationTest extends AbstractZestTest
     {
         String identity1;
         String identity2;
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             EntityBuilder<SimpleName> builder1 = uow.newEntityBuilder( SimpleName.class );
             builder1.instance().name().set( "Niclas" );
@@ -170,7 +170,7 @@ public class ValueWithAssociationTest extends AbstractZestTest
         vb2.prototype().namedSimples().put( "paul", simpleValue );
         DualFaced dualValue = vb2.newInstance();
 
-        try (UnitOfWork uow = uowf.newUnitOfWork())
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork())
         {
             DualFaced dualEntity = uow.toEntity( DualFaced.class, dualValue );
             // The root entity is expected to have changed value,

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java
index 6446232..2fc4b9c 100644
--- a/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/AbstractZestTest.java
@@ -46,7 +46,7 @@ public abstract class AbstractZestTest extends AbstractZestBaseTest
     implements Assembler
 {
     @Structure
-    protected UnitOfWorkFactory uowf;
+    protected UnitOfWorkFactory unitOfWorkFactory;
 
     @Structure
     protected TransientBuilderFactory transientBuilderFactory;
@@ -96,11 +96,11 @@ public abstract class AbstractZestTest extends AbstractZestBaseTest
     public void tearDown()
         throws Exception
     {
-        if( uowf != null && uowf.isUnitOfWorkActive() )
+        if( unitOfWorkFactory != null && unitOfWorkFactory.isUnitOfWorkActive() )
         {
-            while( uowf.isUnitOfWorkActive() )
+            while( unitOfWorkFactory.isUnitOfWorkActive() )
             {
-                UnitOfWork uow = uowf.currentUnitOfWork();
+                UnitOfWork uow = unitOfWorkFactory.currentUnitOfWork();
                 if( uow.isOpen() )
                 {
                     System.err.println( "UnitOfWork not cleaned up:" + uow.usecase().name() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java
index 27519c9..73455ec 100644
--- a/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/entity/AbstractEntityStoreTest.java
@@ -153,14 +153,14 @@ public abstract class AbstractEntityStoreTest
     public void whenNewEntityThenCanFindEntityAndCorrectValues()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             TestEntity instance = createEntity( unitOfWork );
             unitOfWork.complete();
 
             // Find entity
-            unitOfWork = uowf.newUnitOfWork();
+            unitOfWork = unitOfWorkFactory.newUnitOfWork();
             instance = unitOfWork.get( instance );
 
             // Check state
@@ -274,19 +274,19 @@ public abstract class AbstractEntityStoreTest
     public void whenRemovedEntityThenCannotFindEntity()
         throws Exception
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         TestEntity newInstance = createEntity( unitOfWork );
         String identity = newInstance.identity().get();
         unitOfWork.complete();
 
         // Remove entity
-        unitOfWork = uowf.newUnitOfWork();
+        unitOfWork = unitOfWorkFactory.newUnitOfWork();
         TestEntity instance = unitOfWork.get( newInstance );
         unitOfWork.remove( instance );
         unitOfWork.complete();
 
         // Find entity
-        unitOfWork = uowf.newUnitOfWork();
+        unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             unitOfWork.get( TestEntity.class, identity );
@@ -309,21 +309,21 @@ public abstract class AbstractEntityStoreTest
         TestEntity testEntity;
         String version;
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             version = spi.entityStateOf( testEntity ).version();
 
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
             assertThat( "version has not changed", newVersion, equalTo( version ) );
@@ -339,14 +339,14 @@ public abstract class AbstractEntityStoreTest
         TestEntity testEntity;
         String version;
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             testEntity.name().set( "Rickard" );
             version = spi.entityStateOf( testEntity ).version();
@@ -354,7 +354,7 @@ public abstract class AbstractEntityStoreTest
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
             assertThat( "version has changed", newVersion, not( equalTo( version ) ) );
@@ -370,14 +370,14 @@ public abstract class AbstractEntityStoreTest
         TestEntity testEntity;
         String version;
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             testEntity.manyAssociation().add( 0, testEntity );
             version = spi.entityStateOf( testEntity ).version();
@@ -385,7 +385,7 @@ public abstract class AbstractEntityStoreTest
             unitOfWork.complete();
         }
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             testEntity = unitOfWork.get( testEntity );
             String newVersion = spi.entityStateOf( testEntity ).version();
             assertThat( "version has changed", newVersion, not( equalTo( version ) ) );
@@ -400,7 +400,7 @@ public abstract class AbstractEntityStoreTest
     {
         TestEntity testEntity;
         {
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             EntityBuilder<TestEntity> builder = unitOfWork.newEntityBuilder( TestEntity.class );
 
             testEntity = builder.newInstance();
@@ -412,7 +412,7 @@ public abstract class AbstractEntityStoreTest
         String version;
         {
             // Start working with Entity in one UoW
-            unitOfWork1 = uowf.newUnitOfWork();
+            unitOfWork1 = unitOfWorkFactory.newUnitOfWork();
             testEntity1 = unitOfWork1.get( testEntity );
             version = spi.entityStateOf( testEntity1 ).version();
             if( version.isEmpty() )
@@ -425,7 +425,7 @@ public abstract class AbstractEntityStoreTest
         }
         {
             // Start working with same Entity in another UoW, and complete it
-            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
             TestEntity testEntity2 = unitOfWork.get( testEntity );
             assertThat( "version is correct", spi.entityStateOf( testEntity1 ).version(), equalTo( version ) );
             testEntity2.name().set( "B" );
@@ -445,7 +445,7 @@ public abstract class AbstractEntityStoreTest
         }
         {
             // Check values
-            unitOfWork1 = uowf.newUnitOfWork();
+            unitOfWork1 = unitOfWorkFactory.newUnitOfWork();
             testEntity1 = unitOfWork1.get( testEntity );
             assertThat( "property name has not been set", testEntity1.name().get(), equalTo( "B" ) );
             assertThat( "version is incorrect", spi.entityStateOf( testEntity1 ).version(),
@@ -458,19 +458,19 @@ public abstract class AbstractEntityStoreTest
     public void givenEntityStoredLoadedChangedWhenUnitOfWorkDiscardsThenDontStoreState()
         throws UnitOfWorkCompletionException
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
+        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
         try
         {
             String identity = createEntity( unitOfWork ).identity().get();
             unitOfWork.complete();
 
-            unitOfWork = uowf.newUnitOfWork();
+            unitOfWork = unitOfWorkFactory.newUnitOfWork();
             TestEntity entity = unitOfWork.get( TestEntity.class, identity );
             assertThat( entity.intValue().get(), is( 42 ) );
             entity.intValue().set( 23 );
             unitOfWork.discard();
 
-            unitOfWork = uowf.newUnitOfWork();
+            unitOfWork = unitOfWorkFactory.newUnitOfWork();
             entity = unitOfWork.get( TestEntity.class, identity );
             assertThat( entity.intValue().get(), is( 42 ) );
         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java
index 7d7e3b3..32d9232 100644
--- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractPlainValueSerializationTest.java
@@ -22,9 +22,19 @@ package org.apache.zest.test.value;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.Date;
+import org.apache.zest.api.common.Visibility;
+import org.apache.zest.api.entity.EntityBuilder;
 import org.apache.zest.api.entity.EntityReference;
 import org.apache.zest.api.injection.scope.Service;
+import org.apache.zest.api.property.Property;
+import org.apache.zest.api.unitofwork.UnitOfWork;
+import org.apache.zest.api.usecase.UsecaseBuilder;
+import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueSerialization;
+import org.apache.zest.bootstrap.AssemblyException;
+import org.apache.zest.bootstrap.ModuleAssembly;
+import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
+import org.apache.zest.spi.uuid.UuidIdentityGeneratorService;
 import org.apache.zest.test.AbstractZestTest;
 import org.joda.time.DateTime;
 import org.joda.time.LocalDate;
@@ -49,6 +59,17 @@ public abstract class AbstractPlainValueSerializationTest
     @SuppressWarnings( "ProtectedField" )
     protected ValueSerialization valueSerialization;
 
+    @Override
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.values( Regression142Type.class );
+        module.entities( Regression142Type.class );
+
+        module.services( MemoryEntityStoreService.class );
+        module.services( UuidIdentityGeneratorService.class );
+    }
+
     @Test
     public void givenCharacterValueWhenSerializingAndDeserializingExpectEquals()
     {
@@ -225,4 +246,63 @@ public abstract class AbstractPlainValueSerializationTest
         EntityReference deserialized = valueSerialization.deserialize( module, EntityReference.class, serialized );
         assertThat( deserialized, equalTo( EntityReference.parseEntityReference( "ABCD-1234" ) ) );
     }
+
+    @Test
+    public void zest142RegressionTest()
+        throws Exception
+    {
+        ValueSerialization serialization = serviceFinder.findService( ValueSerialization.class )
+            .get();
+
+        Regression142Type value;
+        {
+            ValueBuilder<Regression142Type> builder = valueBuilderFactory.newValueBuilder( Regression142Type.class );
+            builder.prototype().price().set( 23.45 );
+            builder.prototype().testenum().set( Regression142Enum.B );
+            value = builder.newInstance();
+            String serialized = serialization.serialize( value );
+            System.out.println( serialized ); // ok
+            value = serialization.deserialize( module, Regression142Type.class, serialized ); // ok
+        }
+        {
+            String valueId = "abcdefg";
+            {
+                try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "create" ) ))
+                {
+                    EntityBuilder<Regression142Type> builder = uow.newEntityBuilder( Regression142Type.class, valueId );
+                    builder.instance().price().set( 45.67 );
+                    builder.instance().testenum().set( Regression142Enum.A );
+                    value = builder.newInstance();
+                    System.out.println( value.testenum().get() );
+                    uow.complete();
+                }
+                catch( Exception e_ )
+                {
+                    e_.printStackTrace();
+                }
+            }
+            {
+                try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "create" ) ))
+                {
+                    value = uow.get( Regression142Type.class, valueId );
+                    System.out.println( value.price().get() );
+                    System.out.println( value.testenum().get() ); // FAIL
+                }
+            }
+        }
+    }
+
+
+    private enum Regression142Enum
+    {
+        A, B, C, D
+    }
+
+    interface Regression142Type
+    {
+        Property<Double> price();
+
+        Property<Regression142Enum> testenum();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java
index 0c7384c..3a08c81 100644
--- a/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/value/AbstractValueCompositeSerializationTest.java
@@ -92,7 +92,7 @@ public abstract class AbstractValueCompositeSerializationTest
     public void givenValueCompositeWhenSerializingAndDeserializingExpectEquals()
         throws Exception
     {
-        UnitOfWork uow = uowf.newUnitOfWork();
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork();
         try
         {
             SomeValue some = buildSomeValue();
@@ -214,7 +214,7 @@ public abstract class AbstractValueCompositeSerializationTest
 
     private BarEntity buildBarEntity( String cathedral )
     {
-        EntityBuilder<BarEntity> barBuilder = uowf.currentUnitOfWork().newEntityBuilder( BarEntity.class );
+        EntityBuilder<BarEntity> barBuilder = unitOfWorkFactory.currentUnitOfWork().newEntityBuilder( BarEntity.class );
         barBuilder.instance().cathedral().set( cathedral );
         return barBuilder.newInstance();
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/DerbySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/DerbySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/DerbySQLEntityStoreTest.java
index 8c2d2db..eb9555f 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/DerbySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/DerbySQLEntityStoreTest.java
@@ -80,7 +80,7 @@ public class DerbySQLEntityStoreTest
     public void tearDown()
         throws Exception
     {
-        UnitOfWork uow = this.uowf.newUnitOfWork( UsecaseBuilder.newUsecase(
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase(
             "Delete " + getClass().getSimpleName() + " test data" ) );
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/61427b8a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/MySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/MySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/MySQLEntityStoreTest.java
index 20f1b75..2524c32 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/MySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/zest/entitystore/sql/MySQLEntityStoreTest.java
@@ -91,7 +91,7 @@ public class MySQLEntityStoreTest
         {
             return;
         }
-        UnitOfWork uow = this.uowf.newUnitOfWork(
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork(
             UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
         );
         try


Mime
View raw message