polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [5/6] polygene-java git commit: POLYGENE-257 Fix tests requiring default services
Date Sat, 27 May 2017 09:45:59 GMT
POLYGENE-257 Fix tests requiring default services

EntityTestAssembler now assemble default services, this cover most of
the tests requiring default services.

Changes are on either non-trivial tests that require proper visibilities
or test exercising default services.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/0e01c148
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/0e01c148
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/0e01c148

Branch: refs/heads/develop
Commit: 0e01c148274ff4d31fdd3d919de657bcf8a6cc40
Parents: 52fe157
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Sat May 27 11:45:16 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Sat May 27 11:45:16 2017 +0200

----------------------------------------------------------------------
 ...aceCollisionWithUnrelatedReturnTypesTest.java |  1 +
 .../polygene/regression/qi382/Qi382Test.java     |  5 +++--
 .../polygene/regression/qi383/Qi383Test.java     |  5 +++--
 .../appliesto/AppliesToOrConditionQI241Test.java |  2 ++
 .../association/AssociationAssignmentTest.java   |  5 +++--
 .../runtime/concerns/GenericConcernTest.java     |  2 ++
 .../runtime/defaults/UseDefaultsTest.java        |  2 ++
 .../runtime/property/ValueNestedBuilderTest.java |  2 ++
 .../polygene/runtime/query/NonQueryableTest.java |  1 +
 .../unitofwork/PrivateEntityUnitOfWorkTest.java  |  6 +++++-
 .../runtime/value/AssociationToValueTest.java    |  5 +++--
 .../runtime/value/NestedValueBuilderTest.java    |  2 ++
 .../runtime/value/ValueCompositeBasicsTest.java  |  2 ++
 .../runtime/value/ValueWithAssociationTest.java  |  5 +++--
 .../visibility/VisibilityInUnitOfWorkTest.java   |  4 ++--
 .../memory/MemoryEntityStoreTest.java            |  2 ++
 .../helpers/JSONManyAssociationStateTest.java    |  1 +
 .../helpers/JsonNamedAssociationStateTest.java   |  1 +
 .../polygene/test/EntityTestAssembler.java       | 19 ++++++++++++++++++-
 ...AbstractConfigurationDeserializationTest.java |  4 ++--
 .../metrics/AbstractPolygeneMetricsTest.java     |  2 +-
 .../cassandra/CassandraMapEntityStoreTest.java   |  2 +-
 .../entitystore/file/FileEntityStoreTest.java    |  2 +-
 .../file/FileEntityStoreWithCacheTest.java       |  2 +-
 .../entitystore/geode/GeodeEntityStoreTest.java  |  2 +-
 .../geode/GeodeEntityStoreWithCacheTest.java     |  2 +-
 .../hazelcast/HazelcastEntityStoreTest.java      |  2 +-
 .../HazelcastEntityStoreWithCacheTest.java       |  2 +-
 .../jclouds/JCloudsFilesystemTest.java           |  2 +-
 .../entitystore/jclouds/JCloudsS3Test.java       |  2 +-
 .../jclouds/JCloudsTransientTest.java            |  2 +-
 .../jclouds/JCloudsWithCacheTest.java            |  2 +-
 .../entitystore/jdbm/JdbmEntityStoreTest.java    |  2 +-
 .../jdbm/JdbmEntityStoreWithCacheTest.java       |  2 +-
 .../leveldb/JavaLevelDBEntityStoreTest.java      |  2 +-
 .../leveldb/JniLevelDBEntityStoreTest.java       |  2 +-
 .../leveldb/LevelDBEntityStoreWithCacheTest.java |  2 +-
 .../memory/MemoryEntityStoreTest.java            |  1 +
 .../memory/MemoryEntityStoreWithCacheTest.java   |  1 +
 .../mongodb/EmbedMongoMapEntityStoreTest.java    |  2 +-
 .../mongodb/MongoMapEntityStoreTest.java         |  2 +-
 .../MongoMapEntityStoreWithCacheTest.java        |  2 +-
 .../preferences/PreferencesEntityStoreTest.java  |  4 ++--
 .../redis/RedisMapEntityStoreTest.java           |  2 +-
 .../redis/RedisMapEntityStoreWithCacheTest.java  |  2 +-
 .../entitystore/riak/RiakMapEntityStoreTest.java |  2 +-
 .../riak/RiakMapEntityStoreWithCacheTest.java    |  2 +-
 .../entitystore/sql/DerbySQLEntityStoreTest.java |  2 +-
 .../entitystore/sql/H2SQLEntityStoreTest.java    |  2 +-
 .../entitystore/sql/MySQLEntityStoreTest.java    |  2 +-
 .../sql/PostgreSQLEntityStoreTest.java           |  2 +-
 .../entitystore/sql/SQLiteEntityStoreTest.java   |  2 +-
 .../polygene/index/rdf/qi95/Qi95IssueTest.java   |  5 ++++-
 .../polygene/index/reindexer/ReindexerTest.java  |  2 +-
 ...avaxJsonConfigurationDeserializationTest.java |  8 ++++++++
 .../client/ContextResourceClientFactoryTest.java |  2 ++
 .../rest/client/ContinuousIntegrationTest.java   |  2 ++
 .../library/rest/client/RssReaderTest.java       |  2 ++
 .../jdbm/JdbmEntityStorePerformanceTest.java     |  2 +-
 .../memory/MemoryEntityStorePerformanceTest.java |  5 ++++-
 .../sql/DerbySQLEntityStorePerformanceTest.java  |  2 +-
 .../PostgreSQLEntityStorePerformanceTest.java    |  4 ++--
 .../polygene/tutorials/hello/HelloTest4.java     |  1 +
 63 files changed, 121 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
index 7e149e0..8a1fbae 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi377/InterfaceCollisionWithUnrelatedReturnTypesTest.java
@@ -33,6 +33,7 @@ public class InterfaceCollisionWithUnrelatedReturnTypesTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
+        module.defaultServices();
     }
 
     public interface Person

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
index f09aa1c..8592a3c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi382/Qi382Test.java
@@ -33,8 +33,8 @@ import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -51,8 +51,9 @@ public class Qi382Test extends AbstractPolygeneTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.addServices( MemoryEntityStoreService.class );
         module.entities( Car.class, Person.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java b/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
index 8ed138c..8ec0369 100644
--- a/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/regression/qi383/Qi383Test.java
@@ -26,8 +26,8 @@ import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 public class Qi383Test extends AbstractPolygeneTest
@@ -36,8 +36,9 @@ public class Qi383Test extends AbstractPolygeneTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.addServices( MemoryEntityStoreService.class );
         module.entities( Car.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test( expected = EntityCompositeAlreadyExistsException.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java b/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
index 6a01c0c..7a56d88 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/appliesto/AppliesToOrConditionQI241Test.java
@@ -53,6 +53,8 @@ public class AppliesToOrConditionQI241Test
         module.services( SomeServiceCompositeWithTwoAnnotations.class );
         module.services( SomeServiceCompositeWithFirstAnnotation.class );
         module.services( SomeServiceCompositeWithSecondAnnotation.class );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
index c3131eb..1c9a13c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/association/AssociationAssignmentTest.java
@@ -27,8 +27,8 @@ import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -42,9 +42,10 @@ public class AssociationAssignmentTest extends AbstractPolygeneTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        module.services( MemoryEntityStoreService.class );
         module.entities( TheAssociatedType.class );
         module.entities( TheMainType.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
index 2de631a..c48675e 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/concerns/GenericConcernTest.java
@@ -43,6 +43,8 @@ public class GenericConcernTest
         throws AssemblyException
     {
         module.transients( SomeComposite.class );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
index 2bc7b34..fe3e46a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/defaults/UseDefaultsTest.java
@@ -47,6 +47,8 @@ public class UseDefaultsTest extends AbstractPolygeneTest
     {
         module.transients( TestComposite.class );
         module.forMixin( TestComposite.class ).declareDefaults().assemblyString().set( "habba" );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
index 026cb13..0f14212 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/property/ValueNestedBuilderTest.java
@@ -74,6 +74,8 @@ public class ValueNestedBuilderTest
         throws AssemblyException
     {
         module.values( InnerValue.class, InnerDefaultedValue.class, OuterValue.class, OuterDefaultedValue.class );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
index 8cae196..0f12d7d 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/query/NonQueryableTest.java
@@ -39,6 +39,7 @@ public class NonQueryableTest
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
index 630ccca..26148ee 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/unitofwork/PrivateEntityUnitOfWorkTest.java
@@ -22,6 +22,7 @@ package org.apache.polygene.runtime.unitofwork;
 
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.identity.HasIdentity;
@@ -79,7 +80,10 @@ public class PrivateEntityUnitOfWorkTest
                                 module.entities( ProductEntity.class );
                                 module.entities( ProductCatalogEntity.class ).visibleIn( application );
                                 module.values( ProductInfo.class );
-                                new EntityTestAssembler().assemble( module );
+
+                                new EntityTestAssembler().visibleIn( Visibility.module )
+                                                         .defaultServicesVisibleIn( Visibility.application )
+                                                         .assemble( module );
                             }
                         }
                     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
index 18b6935..3c49336 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/AssociationToValueTest.java
@@ -37,8 +37,8 @@ import org.apache.polygene.api.unitofwork.concern.UnitOfWorkConcern;
 import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
@@ -100,12 +100,13 @@ public class AssociationToValueTest extends AbstractPolygeneTest
         module.entities( Person.class );
         module.values( Person.class );
         module.services( PersonRepository.class ).withConcerns( UnitOfWorkConcern.class );
-        module.services( MemoryEntityStoreService.class );
 
         module.services( Runnable.class )
             .withMixins( LoadData.class )
             .withConcerns( UnitOfWorkConcern.class )
             .instantiateOnStartup();
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
index 45859de..0679343 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/NestedValueBuilderTest.java
@@ -78,6 +78,8 @@ public class NestedValueBuilderTest
         throws AssemblyException
     {
         module.values( InnerValue.class, InnerDefaultedValue.class, OuterValue.class, OuterDefaultedValue.class );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
index bc538f1..74f6226 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueCompositeBasicsTest.java
@@ -39,6 +39,8 @@ public class ValueCompositeBasicsTest
         throws AssemblyException
     {
         module.values( SomeValue.class );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
index 4441a76..db3d02f 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/value/ValueWithAssociationTest.java
@@ -36,8 +36,8 @@ import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -53,7 +53,8 @@ public class ValueWithAssociationTest extends AbstractPolygeneTest
         module.entities( DualFaced.class );
         module.values( SimpleName.class );
         module.values( DualFaced.class );
-        module.services( MemoryEntityStoreService.class );
+
+        new EntityTestAssembler().assemble( module );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
index a43e689..2fb301b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/visibility/VisibilityInUnitOfWorkTest.java
@@ -35,7 +35,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 public class VisibilityInUnitOfWorkTest
@@ -149,7 +149,7 @@ public class VisibilityInUnitOfWorkTest
             myModule.entities( MyEntity.class );
             yourModule.entities( YourEntity.class );
             yourModule.services( YourService.class ).visibleIn( Visibility.layer );
-            infraModule.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
+            new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( infraModule );
             return appAssembly;
         } );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java b/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
index 25c4a1b..2036424 100644
--- a/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStoreTest.java
@@ -44,6 +44,8 @@ public class MemoryEntityStoreTest
         module.services( MemoryEntityStoreService.class );
         module.importedServices( StatePrinter.class ).importedBy( NEW_OBJECT );
         module.objects( StatePrinter.class );
+
+        module.defaultServices();
     }
 
     private static class StatePrinter

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
----------------------------------------------------------------------
diff --git a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
index a55c642..d901c6b 100644
--- a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
+++ b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JSONManyAssociationStateTest.java
@@ -44,6 +44,7 @@ public class JSONManyAssociationStateTest extends AbstractPolygeneTest
     @Override
     public void assemble( ModuleAssembly module )
     {
+        module.defaultServices();
     }
 
     @Service

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
----------------------------------------------------------------------
diff --git a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
index 5bab0c1..5b55d1d 100644
--- a/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
+++ b/core/spi/src/test/java/org/apache/polygene/spi/entitystore/helpers/JsonNamedAssociationStateTest.java
@@ -44,6 +44,7 @@ public class JsonNamedAssociationStateTest extends AbstractPolygeneTest
     @Override
     public void assemble( ModuleAssembly module )
     {
+        module.defaultServices();
     }
 
     @Service

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java b/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
index 76634b4..36827b8 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/EntityTestAssembler.java
@@ -19,17 +19,26 @@
  */
 package org.apache.polygene.test;
 
+import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.Assemblers;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 
 /**
- * Helper assembler that adds an in-memory EntityStore to the module
+ * Helper assembler that adds an in-memory EntityStore and default services to the module.
  */
 public class EntityTestAssembler
     extends Assemblers.VisibilityIdentity<EntityTestAssembler>
 {
+    private Visibility defaultServicesVisibility;
+
+    public EntityTestAssembler defaultServicesVisibleIn( Visibility visibility )
+    {
+        defaultServicesVisibility = visibility;
+        return this;
+    }
+
     @Override
     public void assemble( ModuleAssembly module )
     {
@@ -38,5 +47,13 @@ public class EntityTestAssembler
         {
             service.identifiedBy( identity() );
         }
+        module.defaultServices().visibleIn( defaultServicesVisibility() );
+    }
+
+    private Visibility defaultServicesVisibility()
+    {
+        return defaultServicesVisibility != null
+               ? defaultServicesVisibility
+               : visibility();
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
index 6cf261b..19f22ab 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractConfigurationDeserializationTest.java
@@ -28,8 +28,8 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.junit.Test;
 
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -45,7 +45,7 @@ public abstract class AbstractConfigurationDeserializationTest extends AbstractP
         module.configurations( ConfigSerializationConfig.class );
         module.values( Host.class );
         module.services( MyService.class ).identifiedBy( "configtest" );
-        storageModule.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
+        new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( storageModule );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
index 4ffaf48..48da4c0 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractPolygeneMetricsTest.java
@@ -213,7 +213,7 @@ public abstract class AbstractPolygeneMetricsTest extends AbstractPolygeneBaseTe
 
     protected Assemblers.Visible<? extends Assembler> entityStoreAssembler( ModuleAssembly configModule, Visibility configVisibility ) throws AssemblyException
     {
-        return new EntityTestAssembler();
+        return new EntityTestAssembler().defaultServicesVisibleIn( Visibility.module );
     }
 
     protected abstract Assemblers.Visible<? extends Assembler> metricsAssembler();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
index dd752d9..19d26b8 100644
--- a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
+++ b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraMapEntityStoreTest.java
@@ -50,7 +50,7 @@ public class CassandraMapEntityStoreTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         module.services( CassandraEntityStoreService.class ).withTypes( CanRemoveAll.class ).withMixins( EmptyCassandraTableMixin.class );
 
         // START SNIPPET: assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
index d18be11..8cc63b0 100644
--- a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
+++ b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreTest.java
@@ -47,7 +47,7 @@ public class FileEntityStoreTest
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
             .assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new FileEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
index 95988da..13b1f87 100644
--- a/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-file/src/test/java/org/apache/polygene/entitystore/file/FileEntityStoreWithCacheTest.java
@@ -45,7 +45,7 @@ public class FileEntityStoreWithCacheTest
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )
             .assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new FileEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
index a6aa1e1..efd4dc1 100644
--- a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
+++ b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreTest.java
@@ -37,7 +37,7 @@ public class GeodeEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new GeodeEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
index 3b30a1b..eed1c87 100644
--- a/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-geode/src/test/java/org/apache/polygene/entitystore/geode/GeodeEntityStoreWithCacheTest.java
@@ -35,7 +35,7 @@ public class GeodeEntityStoreWithCacheTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new GeodeEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
index c2d705f..37ee7f5 100644
--- a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
+++ b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreTest.java
@@ -41,7 +41,7 @@ public class HazelcastEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly configModule = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( configModule );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule );
         // START SNIPPET: assembly
         new HazelcastEntityStoreAssembler().withConfig( configModule, Visibility.layer ).assemble( module );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
index 2b0cfa1..d9c76ec 100644
--- a/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-hazelcast/src/test/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreWithCacheTest.java
@@ -35,7 +35,7 @@ public class HazelcastEntityStoreWithCacheTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new HazelcastEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
index 91abf14..3dd6953 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsFilesystemTest.java
@@ -41,7 +41,7 @@ public class JCloudsFilesystemTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         JCloudsMapEntityStoreConfiguration defaults = config.forMixin( JCloudsMapEntityStoreConfiguration.class )
                                                             .declareDefaults();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
index 720b072..fc00581 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
@@ -37,7 +37,7 @@ public class JCloudsS3Test extends AbstractEntityStoreTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         JCloudsMapEntityStoreConfiguration defaults = config.forMixin( JCloudsMapEntityStoreConfiguration.class )
                                                             .declareDefaults();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
index 266c0e1..c47b2e1 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsTransientTest.java
@@ -34,7 +34,7 @@ public class JCloudsTransientTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
index 72f89cf..30ae92b 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsWithCacheTest.java
@@ -35,7 +35,7 @@ public class JCloudsWithCacheTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
index bd3cef4..822201d 100644
--- a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
+++ b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreTest.java
@@ -43,7 +43,7 @@ public class JdbmEntityStoreTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
index b6bed70..742d69f 100644
--- a/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-jdbm/src/test/java/org/apache/polygene/entitystore/jdbm/JdbmEntityStoreWithCacheTest.java
@@ -43,7 +43,7 @@ public class JdbmEntityStoreWithCacheTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
index c5d4cdc..edd9563 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JavaLevelDBEntityStoreTest.java
@@ -44,7 +44,7 @@ public class JavaLevelDBEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
index 819d930..08177e1 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/JniLevelDBEntityStoreTest.java
@@ -43,7 +43,7 @@ public class JniLevelDBEntityStoreTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
index 9840501..cdb9251 100644
--- a/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-leveldb/src/test/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreWithCacheTest.java
@@ -42,7 +42,7 @@ public class LevelDBEntityStoreWithCacheTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().visibleIn( Visibility.module ).assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new FileConfigurationAssembler()
             .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
index f36cca5..5c1c08a 100644
--- a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
+++ b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreTest.java
@@ -33,6 +33,7 @@ public class MemoryEntityStoreTest
         new MemoryEntityStoreAssembler().assemble( module );
         // END SNIPPET: assembly
         super.assemble( module );
+        module.defaultServices();
         // START SNIPPET: assembly
     }
     // END SNIPPET: assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
index 28dc102..3d51b2c 100644
--- a/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-memory/src/test/java/org/apache/polygene/entitystore/memory/MemoryEntityStoreWithCacheTest.java
@@ -33,5 +33,6 @@ public class MemoryEntityStoreWithCacheTest
     {
         super.assemble( module );
         new MemoryEntityStoreAssembler().assemble( module );
+        module.defaultServices();
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
index 5a65389..d1772f2 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoMapEntityStoreTest.java
@@ -74,7 +74,7 @@ public class EmbedMongoMapEntityStoreTest extends AbstractEntityStoreTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
index 9c48fe5..31ed55c 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreTest.java
@@ -51,7 +51,7 @@ public class MongoMapEntityStoreTest extends AbstractEntityStoreTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
index cad95ea..386743f 100644
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/MongoMapEntityStoreWithCacheTest.java
@@ -50,7 +50,7 @@ public class MongoMapEntityStoreWithCacheTest
         super.assemble( module );
 
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
index 9801ded..648d62a 100644
--- a/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
+++ b/extensions/entitystore-preferences/src/test/java/org/apache/polygene/entitystore/preferences/PreferencesEntityStoreTest.java
@@ -22,8 +22,6 @@ package org.apache.polygene.entitystore.preferences;
 import java.util.prefs.Preferences;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreInfo;
-import org.apache.polygene.entitystore.preferences.PreferencesEntityStoreService;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
@@ -50,5 +48,7 @@ public class PreferencesEntityStoreTest
         PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo( node );
         Thread.currentThread().setContextClassLoader( cl );
         module.services( PreferencesEntityStoreService.class ).setMetaInfo( metaInfo ).instantiateOnStartup();
+
+        module.defaultServices();
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
index e654afc..fdff7b9 100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreTest.java
@@ -44,7 +44,7 @@ public class RedisMapEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
index 1dba76a..3270359 100644
--- a/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-redis/src/test/java/org/apache/polygene/entitystore/redis/RedisMapEntityStoreWithCacheTest.java
@@ -42,7 +42,7 @@ public class RedisMapEntityStoreWithCacheTest
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new RedisEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         RedisEntityStoreConfiguration redisConfig = config.forMixin( RedisEntityStoreConfiguration.class )
                                                           .declareDefaults();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
index c43d846..d3383eb 100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreTest.java
@@ -56,7 +56,7 @@ public class RiakMapEntityStoreTest extends AbstractEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         // START SNIPPET: assembly
         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         // END SNIPPET: assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
index ac4f3ec..a1ea680 100644
--- a/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
+++ b/extensions/entitystore-riak/src/test/java/org/apache/polygene/entitystore/riak/RiakMapEntityStoreWithCacheTest.java
@@ -58,7 +58,7 @@ public class RiakMapEntityStoreWithCacheTest extends AbstractEntityStoreWithCach
     {
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         new RiakEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
         RiakEntityStoreConfiguration riakConfig = config.forMixin( RiakEntityStoreConfiguration.class )
                                                         .declareDefaults();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
index f66ca9c..17700cf 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
@@ -46,7 +46,7 @@ public class DerbySQLEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
index 1aed71f..4b4b759 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
@@ -39,7 +39,7 @@ public class H2SQLEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
index c82bd61..7cdd867 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
@@ -64,7 +64,7 @@ public class MySQLEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
index 1da7b58..489a292 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
@@ -89,7 +89,7 @@ public class PostgreSQLEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
index 07402b5..83e8a21 100644
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
+++ b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
@@ -47,7 +47,7 @@ public class SQLiteEntityStoreTest extends AbstractEntityStoreTest
         // END SNIPPET: assembly
         super.assemble( module );
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
         // START SNIPPET: assembly
         // DataSourceService

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
index 54a35fc..6d03171 100644
--- a/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/polygene/index/rdf/qi95/Qi95IssueTest.java
@@ -225,7 +225,10 @@ public class Qi95IssueTest
         ( layer, name ) -> addModule( layer, name, new RdfMemoryStoreAssembler() );
 
     final ModuleAssemblyBuilder jdbmStore =
-        ( layer, name ) -> addModule( layer, name, new JdbmEntityStoreAssembler().visibleIn( Visibility.application ) );
+        ( layer, name ) -> addModule( layer, name, module -> {
+            new JdbmEntityStoreAssembler().visibleIn( Visibility.application ).assemble( module );
+            module.defaultServices().visibleIn( Visibility.application );
+        } );
 
     final ModuleAssemblyBuilder configModule =
         ( layer, name ) -> addModule( layer, name, entityStoreConfigAssembler() );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
----------------------------------------------------------------------
diff --git a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
index 38c91a8..cf6dcd0 100644
--- a/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
+++ b/extensions/reindexer/src/test/java/org/apache/polygene/index/reindexer/ReindexerTest.java
@@ -74,7 +74,7 @@ public class ReindexerTest
 
         // Configuration
         ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().assemble( config );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
         config.entities( JdbmConfiguration.class, NativeConfiguration.class, ReindexerConfiguration.class )
               .visibleIn( Visibility.layer );
         config.forMixin( JdbmConfiguration.class ).declareDefaults()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
----------------------------------------------------------------------
diff --git a/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java b/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
index f054561..b8bd69d 100644
--- a/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
+++ b/extensions/serialization-javaxjson/src/test/java/org/apache/polygene/serialization/javaxjson/JavaxJsonConfigurationDeserializationTest.java
@@ -17,8 +17,16 @@
  */
 package org.apache.polygene.serialization.javaxjson;
 
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.serialization.javaxjson.assembly.JavaxJsonSerializationAssembler;
 import org.apache.polygene.test.entity.AbstractConfigurationDeserializationTest;
 
 public class JavaxJsonConfigurationDeserializationTest extends AbstractConfigurationDeserializationTest
 {
+    @Override
+    public void assemble( ModuleAssembly module )
+    {
+        new JavaxJsonSerializationAssembler().assemble( module );
+        super.assemble( module );
+    }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
index e979d43..80db1bf 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContextResourceClientFactoryTest.java
@@ -128,6 +128,8 @@ public class ContextResourceClientFactoryTest
 
         module.objects( DescribableContext.class );
         module.transients( TestComposite.class );
+
+        module.defaultServices();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
index 9d66d36..f2653ab 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
@@ -102,6 +102,8 @@ public class ContinuousIntegrationTest
         module.values( BuildSpec.class, BuildResult.class, ServerStatus.class, TagBuildCommand.class, RunBuildCommand.class );
 
         module.objects( RootRestlet.class, RootResource.class, RootContext.class );
+
+        module.defaultServices();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
index bb241df..da9c070 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
@@ -76,6 +76,8 @@ public class RssReaderTest
         // General setup of client
         new ClientAssembler().assemble( module );
         new ValueAssembler().assemble( module );
+
+        module.defaultServices();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
index 3b4e179..23a8832 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
@@ -47,7 +47,7 @@ public class JdbmEntityStorePerformanceTest
             new JdbmEntityStoreAssembler().assemble( module );
             ModuleAssembly configModule = module.layer().module( "Config" );
             configModule.entities( JdbmConfiguration.class ).visibleIn( Visibility.layer );
-            new EntityTestAssembler().assemble( configModule );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule );
 
             module.services( EhCachePoolService.class );
             configModule.entities( EhCacheConfiguration.class ).visibleIn( Visibility.layer );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
index 69da80b..f884bb2 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
@@ -35,7 +35,10 @@ public class MemoryEntityStorePerformanceTest
 
     private static Assembler createAssembler()
     {
-        return module -> new MemoryEntityStoreAssembler().assemble( module );
+        return module -> {
+            new MemoryEntityStoreAssembler().assemble( module );
+            module.defaultServices();
+        };
     }
 
     // Alternate variant that uses the standard MapEntityStore

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
index 656939c..ddec968 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
@@ -50,7 +50,7 @@ public class DerbySQLEntityStorePerformanceTest
     {
         return module -> {
             ModuleAssembly config = module.layer().module( "config" );
-            new EntityTestAssembler().assemble( config );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
             // DataSourceService
             new DBCPDataSourceServiceAssembler()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
index c6ed02b..eac294b 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/PostgreSQLEntityStorePerformanceTest.java
@@ -30,11 +30,11 @@ import org.apache.polygene.bootstrap.ApplicationAssemblerAdapter;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
 import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
 import org.apache.polygene.library.sql.common.SQLConfiguration;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
 import org.junit.Ignore;
 
@@ -63,7 +63,7 @@ public class PostgreSQLEntityStorePerformanceTest
     {
         return module -> {
             ModuleAssembly config = module.layer().module( "config" );
-            config.services( MemoryEntityStoreService.class );
+            new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
 
             // DataSourceService
             new DBCPDataSourceServiceAssembler()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/0e01c148/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
----------------------------------------------------------------------
diff --git a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
index 1ff59eb..563cbe7 100644
--- a/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
+++ b/tutorials/hello/src/test/java/org/apache/polygene/tutorials/hello/HelloTest4.java
@@ -43,6 +43,7 @@ public class HelloTest4 extends AbstractPolygeneTest
     {
         module.entities( Hello.class );
         module.services( MemoryEntityStoreService.class );
+        module.defaultServices();
     }
 
     @Test


Mime
View raw message