polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [12/25] polygene-java git commit: Migrating to JUnit5. Intermediary build where all tests of phase 1 compiles, but not necessarily succeeds.
Date Thu, 19 Apr 2018 02:47:53 GMT
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/AggregatedTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/AggregatedTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/AggregatedTest.java
index f648549..334e043 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/AggregatedTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/AggregatedTest.java
@@ -20,8 +20,6 @@
 
 package org.apache.polygene.runtime.entity;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.entity.Aggregated;
@@ -33,9 +31,11 @@ import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * JAVADOC

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
index 8cb1aff..a240ffe 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityBuilderWithStateTest.java
@@ -36,7 +36,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.MatcherAssert.assertThat;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeEqualityTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeEqualityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeEqualityTest.java
index c2ca024..428c994 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeEqualityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeEqualityTest.java
@@ -19,10 +19,6 @@
  */
 package org.apache.polygene.runtime.entity;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
@@ -30,10 +26,14 @@ 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.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Testing of equality of entity composites.
@@ -44,7 +44,7 @@ public class EntityCompositeEqualityTest
     private UnitOfWork unitOfWork;
     private EntityBuilder<MyComposite> myCompositeBuilder;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp()
         throws Exception
@@ -54,7 +54,7 @@ public class EntityCompositeEqualityTest
         myCompositeBuilder = unitOfWork.newEntityBuilder( MyComposite.class );
     }
 
-    @After
+    @AfterEach
     public void completeUnitOfWork()
         throws Exception
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeToStringTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeToStringTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeToStringTest.java
index 05a8757..6a90474 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeToStringTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCompositeToStringTest.java
@@ -26,12 +26,12 @@ import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.allOf;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
 
 public class EntityCompositeToStringTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCreationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCreationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCreationTest.java
index 4766868..e891212 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCreationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityCreationTest.java
@@ -31,7 +31,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test case for http://team.ops4j.org/browse/QI-274

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
index d814e50..04f2b5d 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityTypeTest.java
@@ -28,7 +28,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class EntityTypeTest
     extends AbstractPolygeneTest

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
index d1d510b..7f96441 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/EntityVisibilityTest.java
@@ -40,9 +40,11 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.Energy4Java;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class EntityVisibilityTest
 {
@@ -54,7 +56,7 @@ public class EntityVisibilityTest
     private Application app;
     private UnitOfWorkFactory uowf;
 
-    @Before
+    @BeforeEach
     public void setup()
         throws Exception
     {
@@ -89,7 +91,7 @@ public class EntityVisibilityTest
         uowf = module.unitOfWorkFactory();
     }
 
-    @After
+    @AfterEach
     public void tearDown()
         throws Exception
     {
@@ -131,11 +133,13 @@ public class EntityVisibilityTest
         service.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingBesideModuleVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.besideModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.besideModuleVisible();
+        } );
     }
 
     @Test
@@ -145,39 +149,49 @@ public class EntityVisibilityTest
         service.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingBelowLayerVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.belowLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.belowLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingBelowModuleVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.belowModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.belowModuleVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingAboveApplicationVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.aboveApplicationVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.aboveApplicationVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingAboveLayerVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.aboveLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.aboveLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromServiceWhenAccessingAboveModuleVisibleExpectException()
     {
-        FromService service = module.findService( FromService.class ).get();
-        service.aboveModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromService service = module.findService( FromService.class ).get();
+            service.aboveModuleVisible();
+        } );
     }
 
     @Test
@@ -270,22 +284,24 @@ public class EntityVisibilityTest
         }
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingBesideModuleVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.besideModuleVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.besideModuleVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
     @Test
@@ -306,94 +322,104 @@ public class EntityVisibilityTest
         }
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingBelowLayerVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.belowLayerVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.belowLayerVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.belowModuleVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.belowModuleVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.aboveApplicationVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.aboveApplicationVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.aboveLayerVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.aboveLayerVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException()
     {
-        UnitOfWork unitOfWork = uowf.newUnitOfWork();
-        try
-        {
-            FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY);
-            entity.aboveModuleVisible();
-        }
-        finally
-        {
-            if( unitOfWork.isOpen() )
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            UnitOfWork unitOfWork = uowf.newUnitOfWork();
+            try
             {
-                unitOfWork.discard();
+                FromEntity entity = unitOfWork.newEntity( FromEntity.class, TEST_IDENTITY );
+                entity.aboveModuleVisible();
             }
-        }
+            finally
+            {
+                if( unitOfWork.isOpen() )
+                {
+                    unitOfWork.discard();
+                }
+            }
+        } );
     }
 
     @Test
@@ -431,11 +457,13 @@ public class EntityVisibilityTest
         value.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingBesideModuleVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.besideModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.besideModuleVisible();
+        } );
     }
 
     @Test
@@ -445,39 +473,49 @@ public class EntityVisibilityTest
         value.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingBelowLayerVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.belowLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.belowLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingBelowModuleVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.belowModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.belowModuleVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingAboveApplicationVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.aboveApplicationVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.aboveApplicationVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingAboveLayerVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.aboveLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.aboveLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromValueWhenAccessingAboveModuleVisibleExpectException()
     {
-        FromValue value = module.newValue( FromValue.class );
-        value.aboveModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromValue value = module.newValue( FromValue.class );
+            value.aboveModuleVisible();
+        } );
     }
 
     @Test
@@ -515,11 +553,13 @@ public class EntityVisibilityTest
         transientt.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingBesideModuleVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.besideModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.besideModuleVisible();
+        } );
     }
 
     @Test
@@ -529,39 +569,49 @@ public class EntityVisibilityTest
         transientt.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingBelowLayerVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.belowLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.belowLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingBelowModuleVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.belowModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.belowModuleVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingAboveApplicationVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.aboveApplicationVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.aboveApplicationVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingAboveLayerVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.aboveLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.aboveLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromTransientWhenAccessingAboveModuleVisibleExpectException()
     {
-        FromTransient transientt = module.newTransient( FromTransient.class );
-        transientt.aboveModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromTransient transientt = module.newTransient( FromTransient.class );
+            transientt.aboveModuleVisible();
+        } );
     }
 
     @Test
@@ -599,11 +649,13 @@ public class EntityVisibilityTest
         object.besideLayerVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingBesideModuleVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.besideModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.besideModuleVisible();
+        } );
     }
 
     @Test
@@ -613,39 +665,49 @@ public class EntityVisibilityTest
         object.belowApplicationVisible();
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingBelowLayerVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.belowLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.belowLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingBelowModuleVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.belowModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.belowModuleVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingAboveApplicationVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.aboveApplicationVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.aboveApplicationVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingAboveLayerVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.aboveLayerVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.aboveLayerVisible();
+        } );
     }
 
-    @Test( expected = NoSuchEntityTypeException.class )
+    @Test
     public void givenFromObjectWhenAccessingAboveModuleVisibleExpectException()
     {
-        FromObject object = module.newObject( FromObject.class );
-        object.aboveModuleVisible();
+        assertThrows( NoSuchEntityTypeException.class, () -> {
+            FromObject object = module.newObject( FromObject.class );
+            object.aboveModuleVisible();
+        } );
     }
 
     private static class FromAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/LifecycleTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/LifecycleTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/LifecycleTest.java
index 1794120..45bf92f 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/LifecycleTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/LifecycleTest.java
@@ -31,9 +31,9 @@ import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.hamcrest.CoreMatchers;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test for the Lifecycle interface

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/QI273Test.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/QI273Test.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/QI273Test.java
index d50f2a6..54f3039 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/QI273Test.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/QI273Test.java
@@ -20,15 +20,15 @@
 
 package org.apache.polygene.runtime.entity;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
 
 /**
  *
@@ -94,8 +94,8 @@ public class QI273Test
         builder.instanceFor( RoleB.class ).theProperty().set( "b" );
         SomeDomainEntity entity = builder.newInstance();
 
-        Assert.assertEquals( "Property must be same as set.", "a", entity.getRoleAProperty() );
-        Assert.assertEquals( "Property must be same as set.", "b", entity.getRoleBProperty() );
+        assertThat( entity.getRoleAProperty() , equalTo( "Property must be same as set.", "a"));
+        assertThat( entity.getRoleBProperty() , equalTo( "Property must be same as set.", "b"));
 
         uow.complete();
 */

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
index 1e953ae..46ca267 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/AssociationTest.java
@@ -22,9 +22,6 @@ package org.apache.polygene.runtime.entity.associations;
 
 import java.io.Serializable;
 import javax.swing.Icon;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.common.Optional;
@@ -34,11 +31,14 @@ import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 /**
  * Tests for associations
@@ -67,18 +67,17 @@ public class AssociationTest
         try
         {
             Company company = unitOfWork.newEntity( Company.class );
-            Assert.assertEquals( "Company Name Default", "A Company", company.name().get() );
-
+            assertThat( "Company Name Default", company.name().get(), equalTo( "A Company" ) );
             {
                 EntityBuilder<Company> builder = unitOfWork.newEntityBuilder( Company.class );
                 final Company companyPrototype = builder.instance();
                 companyPrototype.name().set( "JayWay" );
                 company = builder.newInstance();
-                Assert.assertEquals( "Company Name ", "JayWay", company.name().get() );
+                assertThat( "Company Name ", company.name().get(), equalTo( "JayWay" ) );
             }
 
             company.name().set( "Jayway" );
-            Assert.assertEquals( "Company Name ", "Jayway", company.name().get() );
+            assertThat( "Company Name ", company.name().get(), equalTo( "Jayway" ) );
 
             System.out.println( "Name is:" + company.name().get() );
 
@@ -100,8 +99,8 @@ public class AssociationTest
                 System.out.println( ( (Nameable) employer ).name() );
             }
 
-            Assert.assertEquals( niclas.friend().get(), rickard );
-            Assert.assertEquals( niclas.members().get( 0 ), rickard );
+            assertThat( rickard, equalTo( niclas.friend().get() ) );
+            assertThat( rickard, equalTo( niclas.members().get( 0 ) ) );
 
             // Empty associations
             niclas.friend().set( null );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/ImmutableAssociationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/ImmutableAssociationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/ImmutableAssociationTest.java
index 57c02dc..57aebac 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/ImmutableAssociationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/entity/associations/ImmutableAssociationTest.java
@@ -20,18 +20,21 @@
 
 package org.apache.polygene.runtime.entity.associations;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.association.Association;
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.common.Optional;
+import org.apache.polygene.api.constraint.ConstraintViolationException;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.property.Immutable;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 /**
  * Test that associations can be marked as @Immutable
@@ -66,29 +69,31 @@ public class ImmutableAssociationTest
         }
     }
 
-    @Test( expected = IllegalStateException.class )
+    @Test
     public void givenEntityWithImmutableAssociationWhenChangingValueThenThrowException()
         throws Exception
     {
-        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        try
-        {
-            EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
-            PersonEntity father = builder.instance();
-            father = builder.newInstance();
-
-            builder = unitOfWork.newEntityBuilder( PersonEntity.class );
-            PersonEntity child = builder.instance();
-            child = builder.newInstance();
-
-            child.father().set( father );
-
-            unitOfWork.complete();
-        }
-        finally
-        {
-            unitOfWork.discard();
-        }
+        assertThrows( ConstraintViolationException.class, () -> {
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
+            try
+            {
+                EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
+                PersonEntity father = builder.instance();
+                father = builder.newInstance();
+
+                builder = unitOfWork.newEntityBuilder( PersonEntity.class );
+                PersonEntity child = builder.instance();
+                child = builder.newInstance();
+
+                child.father().set( father );
+
+                unitOfWork.complete();
+            }
+            finally
+            {
+                unitOfWork.discard();
+            }
+        } );
     }
 
     @Test
@@ -113,29 +118,31 @@ public class ImmutableAssociationTest
         }
     }
 
-    @Test( expected = IllegalStateException.class )
+    @Test
     public void givenEntityWithImmutableManyAssociationWhenChangingValueThenThrowException()
         throws Exception
     {
-        UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
-        try
-        {
-            EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
-            PersonEntity person1 = builder.instance();
-            person1 = builder.newInstance();
-
-            builder = unitOfWork.newEntityBuilder( PersonEntity.class );
-            PersonEntity person2 = builder.instance();
-            person2 = builder.newInstance();
-
-            person1.colleagues().add( 0, person2 );
-
-            unitOfWork.complete();
-        }
-        finally
-        {
-            unitOfWork.discard();
-        }
+        assertThrows( IllegalStateException.class, () -> {
+            UnitOfWork unitOfWork = unitOfWorkFactory.newUnitOfWork();
+            try
+            {
+                EntityBuilder<PersonEntity> builder = unitOfWork.newEntityBuilder( PersonEntity.class );
+                PersonEntity person1 = builder.instance();
+                person1 = builder.newInstance();
+
+                builder = unitOfWork.newEntityBuilder( PersonEntity.class );
+                PersonEntity person2 = builder.instance();
+                person2 = builder.newInstance();
+
+                person1.colleagues().add( 0, person2 );
+
+                unitOfWork.complete();
+            }
+            finally
+            {
+                unitOfWork.discard();
+            }
+        } );
     }
 
     interface PersonEntity

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ActivatorInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ActivatorInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ActivatorInjectionTest.java
index 8fed08e..341bc8a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ActivatorInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ActivatorInjectionTest.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.runtime.injection;
 
-import org.junit.Test;
 import org.apache.polygene.api.activation.ActivatorAdapter;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
@@ -32,11 +31,12 @@ import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
-import static org.junit.Assert.assertThat;
 
 /**
  * Assert that injections on Activators works.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
index 41791f7..0a3bd0e 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ConstructorInjectionOfThisTest.java
@@ -28,9 +28,10 @@ import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.sideeffect.SideEffectOf;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertFalse;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
 
 /**
  * This test is created in response to QI-359
@@ -91,7 +92,7 @@ public class ConstructorInjectionOfThisTest
         @Override
         public void doSomething()
         {
-            assertFalse( doesPrivateFragment.someState().get() );
+            assertThat( doesPrivateFragment.someState().get(), is( false ) );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/IllegalUnitOfWorkInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/IllegalUnitOfWorkInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/IllegalUnitOfWorkInjectionTest.java
index ca41d50..3ba1cf8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/IllegalUnitOfWorkInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/IllegalUnitOfWorkInjectionTest.java
@@ -20,17 +20,17 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.State;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class IllegalUnitOfWorkInjectionTest
     extends AbstractPolygeneTest

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
index 91bacbc..a67be22 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/InvocationInjectionTest.java
@@ -29,11 +29,11 @@ import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.injection.scope.Invocation;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 /**
  * Test the @Invocation annotation
@@ -62,21 +62,22 @@ public class InvocationInjectionTest
     {
         @Foo( "1" )
         void doStuff();
-// END SNIPPET: declaration
+
+        // END SNIPPET: declaration
         void doStuff2();
 
         @Foo( "X" )
         void doStuff3();
     }
 
-// START SNIPPET: use1
+    // START SNIPPET: use1
     public abstract static class MyConcern
         extends ConcernOf<MyComposite>
         implements MyComposite
     {
         @Invocation
         Foo foo;
-// END SNIPPET: use1
+        // END SNIPPET: use1
         @Invocation
         Method method;
 
@@ -85,28 +86,25 @@ public class InvocationInjectionTest
 
         public void doStuff()
         {
-            Assert.assertThat( "interface has been injected", foo.value(), CoreMatchers.equalTo( "1" ) );
-            Assert.assertThat( "annotations have been injected", ae.getAnnotation( Foo.class )
-                .value(), CoreMatchers.equalTo( "1" ) );
-            Assert.assertThat( "Method has been injected", method.getName(), CoreMatchers.equalTo( "doStuff" ) );
+            assertThat( "interface has been injected", foo.value(), equalTo( "1" ) );
+            assertThat( "annotations have been injected", ae.getAnnotation( Foo.class ).value(), equalTo( "1" ) );
+            assertThat( "Method has been injected", method.getName(), equalTo( "doStuff" ) );
             next.doStuff();
         }
 
         public void doStuff2()
         {
-            Assert.assertThat( "mixin has been injected", foo.value(), CoreMatchers.equalTo( "2" ) );
-            Assert.assertThat( "annotations have been injected", ae.getAnnotation( Foo.class )
-                .value(), CoreMatchers.equalTo( "2" ) );
-            Assert.assertThat( "Method has been injected", method.getName(), CoreMatchers.equalTo( "doStuff2" ) );
+            assertThat( "mixin has been injected", foo.value(), equalTo( "2" ) );
+            assertThat( "annotations have been injected", ae.getAnnotation( Foo.class ).value(), equalTo( "2" ) );
+            assertThat( "Method has been injected", method.getName(), equalTo( "doStuff2" ) );
             next.doStuff2();
         }
 
         public void doStuff3()
         {
-            Assert.assertThat( "mixin has overridden interface", foo.value(), CoreMatchers.equalTo( "3" ) );
-            Assert.assertThat( "annotations have been injected", ae.getAnnotation( Foo.class )
-                .value(), CoreMatchers.equalTo( "3" ) );
-            Assert.assertThat( "Method has been injected", method.getName(), CoreMatchers.equalTo( "doStuff3" ) );
+            assertThat( "mixin has overridden interface", foo.value(), equalTo( "3" ) );
+            assertThat( "annotations have been injected", ae.getAnnotation( Foo.class ).value(), equalTo( "3" ) );
+            assertThat( "Method has been injected", method.getName(), equalTo( "doStuff3" ) );
             next.doStuff3();
         }
     }
@@ -128,7 +126,8 @@ public class InvocationInjectionTest
         {
         }
     }
-// START SNIPPET: annotation
+
+    // START SNIPPET: annotation
     @Retention( RUNTIME )
     @interface Foo
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
index c9cdd4e..a0a6417 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ServiceInjectionTest.java
@@ -43,13 +43,13 @@ import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.ServiceDeclaration;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.polygene.api.common.Visibility.application;
 import static org.apache.polygene.api.common.Visibility.layer;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 /**
  * Test the @Service injection annotation
@@ -81,14 +81,14 @@ public class ServiceInjectionTest
         ObjectFactory factory = assembly.module();
         ServiceUser user = factory.newObject( ServiceUser.class );
 
-        assertEquals( "X", user.testSingle() );
+        assertThat( user.testSingle(), equalTo( "X" ) );
         assertThat( user.testIdentity(), equalTo( StringIdentity.identityOf( "Foo" ) ) );
-        assertEquals( "FooX", user.testServiceReference() );
-        assertEquals( "Bar", user.testQualifier() );
-        assertEquals( "A", user.testStringIterable() );
-        assertEquals( new Long( 1L ), user.testLongIterable() );
-        assertEquals( "FooXBarX", user.testIterableServiceReferences() );
-        assertEquals( "XX", user.testIterable() );
+        assertThat( user.testServiceReference(), equalTo( "FooX" ) );
+        assertThat( user.testQualifier(), equalTo( "Bar" ) );
+        assertThat( user.testStringIterable(), equalTo( "A" ) );
+        assertThat( user.testLongIterable(), equalTo( 1L ) );
+        assertThat( user.testIterableServiceReferences(), equalTo( "FooXBarX" ) );
+        assertThat( user.testIterable(), equalTo( "XX" ) );
     }
 
     @Test
@@ -142,13 +142,15 @@ public class ServiceInjectionTest
         testInjection( assembly );
     }
 
-    @Test( expected = ConstructionException.class )
+    @Test
     public void testMissingServiceDependency()
         throws ActivationException
     {
-        // No service fulfils the dependency injection -> fail to create application
-        new SingletonAssembler( module -> module.objects( ServiceUser.class ) )
-            .module().newObject( ServiceUser.class );
+        assertThrows( ConstructionException.class, () -> {
+            // No service fulfils the dependency injection -> fail to create application
+            new SingletonAssembler( module -> module.objects( ServiceUser.class ) )
+                .module().newObject( ServiceUser.class );
+        } );
     }
 
     @Mixins( MyServiceMixin.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateDescriptorInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateDescriptorInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateDescriptorInjectionTest.java
index 593ffb8..57d66f5 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateDescriptorInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateDescriptorInjectionTest.java
@@ -30,11 +30,11 @@ import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @State annotation with StateDescriptor type

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateInjectionTest.java
index f6a0663..be28ad8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateInjectionTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
@@ -31,10 +30,11 @@ import org.apache.polygene.api.property.StateHolder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @State annotation

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateParameterInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateParameterInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateParameterInjectionTest.java
index 74e632c..565bc49 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateParameterInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StateParameterInjectionTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.State;
@@ -29,10 +28,11 @@ import org.apache.polygene.api.property.Property;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @State annotation when used for parameters

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StructureInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StructureInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StructureInjectionTest.java
index d98c51e..8b077a8 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StructureInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/StructureInjectionTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.junit.Test;
 import org.apache.polygene.api.PolygeneAPI;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
 import org.apache.polygene.api.composite.TransientComposite;
@@ -34,10 +33,11 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.spi.PolygeneSPI;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @Structure annotation

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ThisInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ThisInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ThisInjectionTest.java
index de0aed8..3c8bff9 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ThisInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/ThisInjectionTest.java
@@ -32,10 +32,11 @@ import org.apache.polygene.api.sideeffect.SideEffects;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @This annotation
@@ -56,7 +57,7 @@ public class ThisInjectionTest
      *
      * @throws Exception re-thrown
      */
-    @org.junit.Test
+    @Test
     public void givenCompositeWithThisInjectionsWhenInstantiatedThenCompositeIsInjected()
         throws Exception
     {
@@ -65,7 +66,7 @@ public class ThisInjectionTest
         assertThat( "Injection worked", testComposite.isInjected() && sideEffectInjected, is( equalTo( true ) ) );
     }
 
-    public interface Test
+    public interface TestType
     {
         boolean isInjected();
 
@@ -82,15 +83,15 @@ public class ThisInjectionTest
     @Concerns( TestConcern.class )
     @Mixins( TestMixin.class )
     public interface TestComposite
-        extends TransientComposite, Test
+        extends TransientComposite, TestType
     {
     }
 
     public static class TestMixin
-        implements Test
+        implements TestType
     {
         @This
-        Test test;
+        TestType test;
 
         @This
         TestPrivate testPrivate;
@@ -107,11 +108,11 @@ public class ThisInjectionTest
     }
 
     public static abstract class TestConcern
-        extends ConcernOf<Test>
-        implements Test
+        extends ConcernOf<TestType>
+        implements TestType
     {
         @This
-        Test test;
+        TestType test;
 
         @This
         TestPrivate testPrivate;
@@ -125,11 +126,11 @@ public class ThisInjectionTest
     }
 
     public static abstract class TestSideEffect
-        extends SideEffectOf<Test>
-        implements Test
+        extends SideEffectOf<TestType>
+        implements TestType
     {
         @This
-        Test test;
+        TestType test;
         @This
         TestPrivate testPrivate;
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
index 4dd7111..a86b916 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UnitOfWorkInjectionTest.java
@@ -31,9 +31,10 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 public class UnitOfWorkInjectionTest
     extends AbstractPolygeneTest
@@ -61,8 +62,8 @@ public class UnitOfWorkInjectionTest
             UnitOfWork uow2 = unitOfWorkFactory.newUnitOfWork( usecase );
             trial = uow.get( trial );
             trial.doSomething();
-            assertEquals( "123", ( (EntityComposite) trial ).identity().get().toString() );
-            assertEquals( "usecase1", trial.usecaseName() );
+            assertThat( ( (EntityComposite) trial ).identity().get().toString(), equalTo( "123" ) );
+            assertThat( trial.usecaseName(), equalTo( "usecase1" ) );
             uow2.discard();
         }
         catch( Throwable ex )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericClassTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericClassTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericClassTest.java
index 2b94d47..a979305 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericClassTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericClassTest.java
@@ -19,17 +19,17 @@
  */
 package org.apache.polygene.runtime.injection;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test of generic class injection

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericListTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericListTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericListTest.java
index 7dc6f78..a4c3a72 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericListTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGenericListTest.java
@@ -21,7 +21,6 @@
 package org.apache.polygene.runtime.injection;
 
 import java.util.ArrayList;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.injection.scope.Uses;
@@ -29,6 +28,7 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test of generic list injection

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGraphTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGraphTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGraphTest.java
index d42c846..a689f9b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGraphTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesGraphTest.java
@@ -20,15 +20,15 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test creation of object graph, where @Uses is used to refer to instances
@@ -48,16 +48,16 @@ public class UsesGraphTest
         D d = new D();
         A a = objectFactory.newObject( A.class, objectFactory.newObject( C.class, d ), d );
 
-        Assert.assertThat( "Same reference expected", a.c, equalTo( a.b.c ) );
-        Assert.assertThat( "Same reference expected", a.d, equalTo( a.b.c.d ) );
+        assertThat( "Same reference expected", a.c, equalTo( a.b.c ) );
+        assertThat( "Same reference expected", a.d, equalTo( a.b.c.d ) );
     }
 
     @Test
     public void givenGraphDependenciesWhenInstantiateUsingBuildersThenDontGetSameReferences()
     {
         A a = objectFactory.newObject( A.class );
-        Assert.assertThat( "Same reference not expected", a.c, not( equalTo( a.b.c ) ) );
-        Assert.assertThat( "Same reference not expected", a.d, not( equalTo( a.b.c.d ) ) );
+        assertThat( "Same reference not expected", a.c, not( equalTo( a.b.c ) ) );
+        assertThat( "Same reference not expected", a.d, not( equalTo( a.b.c.d ) ) );
     }
 
     static public class A

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesInjectionTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesInjectionTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesInjectionTest.java
index 88c55c2..5713c6c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesInjectionTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/injection/UsesInjectionTest.java
@@ -20,16 +20,16 @@
 
 package org.apache.polygene.runtime.injection;
 
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test the @Uses annotation

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
index 69824d7..a17c7f0 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ConfigurationInstantiationTest.java
@@ -28,11 +28,11 @@ 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.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
-import static org.junit.Assert.assertThat;
 
 public class ConfigurationInstantiationTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/EagerServiceInstantiationTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/EagerServiceInstantiationTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/EagerServiceInstantiationTest.java
index 70282d3..e382d76 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/EagerServiceInstantiationTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/EagerServiceInstantiationTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.runtime.instantiation;
 
-import org.junit.Test;
 import org.apache.polygene.api.injection.scope.Uses;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.service.ServiceComposite;
@@ -28,8 +27,10 @@ import org.apache.polygene.api.service.ServiceDescriptor;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 public class EagerServiceInstantiationTest
     extends AbstractPolygeneTest
@@ -46,7 +47,7 @@ public class EagerServiceInstantiationTest
     @Test
     public void givenServiceInstantiatedOnStartUpWhenTestIsRunExpectServiceToHaveRun()
     {
-        assertEquals( "123", testInfo.test );
+        assertThat( testInfo.test, equalTo( "123" ) );
     }
 
     @Mixins( MyMixin.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ServiceInstantiationTests.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ServiceInstantiationTests.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ServiceInstantiationTests.java
index 214c4bc..dd63514 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ServiceInstantiationTests.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ServiceInstantiationTests.java
@@ -19,9 +19,6 @@
  */
 package org.apache.polygene.runtime.instantiation;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.configuration.Configuration;
 import org.apache.polygene.api.injection.scope.This;
 import org.apache.polygene.api.mixin.Mixins;
@@ -29,7 +26,12 @@ import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 public class ServiceInstantiationTests
     extends AbstractPolygeneTest
@@ -49,7 +51,7 @@ public class ServiceInstantiationTests
         throws Exception
     {
         ServiceReference<My> service = serviceFinder.findService( My.class );
-        Assert.assertEquals( "HabbaZout", service.get().doSomething() );
+        assertThat( service.get().doSomething(), equalTo( "HabbaZout" ) );
     }
 
     @Mixins( MyMixin.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/TransientInstantiationTests.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/TransientInstantiationTests.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/TransientInstantiationTests.java
index 39f17f0..443d80c 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/TransientInstantiationTests.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/TransientInstantiationTests.java
@@ -19,14 +19,16 @@
  */
 package org.apache.polygene.runtime.instantiation;
 
-import org.junit.Assert;
-import org.junit.Test;
 import org.apache.polygene.api.composite.TransientBuilder;
 import org.apache.polygene.api.composite.TransientComposite;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 public class TransientInstantiationTests
     extends AbstractPolygeneTest
@@ -43,7 +45,7 @@ public class TransientInstantiationTests
     {
         TransientBuilder<My> builder = transientBuilderFactory.newTransientBuilder( My.class );
         My my = builder.newInstance();
-        Assert.assertEquals( "Niclas", my.doSomething() );
+        assertThat( my.doSomething(), equalTo( "Niclas" ) );
     }
 
     @Mixins( MyMixin.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
index b149220..b842983 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/instantiation/ValueInstantiationTests.java
@@ -25,10 +25,11 @@ import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.fail;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class ValueInstantiationTests
     extends AbstractPolygeneTest
@@ -85,7 +86,7 @@ public class ValueInstantiationTests
     {
         ValueBuilder<My> builder = valueBuilderFactory.newValueBuilder( My.class );
         My my = builder.newInstance();
-        Assert.assertEquals( "Niclas", my.doSomething() );
+        assertThat( my.doSomething(), equalTo( "Niclas" ) );
     }
 
     @Mixins( MyMixin.class )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/methods/AccessibleTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/methods/AccessibleTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/methods/AccessibleTest.java
index f420ef7..d974ff9 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/methods/AccessibleTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/methods/AccessibleTest.java
@@ -25,11 +25,11 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class AccessibleTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
index 9e67af3..d1cf6d1 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyMixinTest.java
@@ -29,10 +29,10 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test of declaring mixin in assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
index ca15bc4..a1b39d1 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/AssemblyRoleTest.java
@@ -30,10 +30,10 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test of declaring types in assembly

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/DefaultMethodsTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/DefaultMethodsTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/DefaultMethodsTest.java
index 20f22be..08ceaa0 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/DefaultMethodsTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/DefaultMethodsTest.java
@@ -23,19 +23,19 @@ import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.polygene.test.util.Assume.assumeJavaVersion;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 /**
  * Initial tests for interface default methods support.
  */
 public class DefaultMethodsTest extends AbstractPolygeneTest
 {
-    @BeforeClass
+    @BeforeAll
     public static void assumeJavaVersionIs8() { assumeJavaVersion( 8 ); }
 
     @Override

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InitializableTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InitializableTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InitializableTest.java
index cc5e054..b956db3 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InitializableTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InitializableTest.java
@@ -21,19 +21,18 @@
 package org.apache.polygene.runtime.mixin;
 
 import org.apache.polygene.api.injection.scope.This;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.util.NotYetImplemented;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
 import org.apache.polygene.api.mixin.Initializable;
 import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.util.NotYetImplemented;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Test of Initializable interface
@@ -199,7 +198,7 @@ public class InitializableTest extends AbstractPolygeneTest
 
     static boolean noMethodMixinOk;
 
-    @Before
+    @BeforeEach
     public void resetNoMethodMixinStaticState()
     {
         noMethodMixinOk = false;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InvokeServiceFromModuleAssemblyTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InvokeServiceFromModuleAssemblyTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InvokeServiceFromModuleAssemblyTest.java
index eb34cfa..d6fec5b 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InvokeServiceFromModuleAssemblyTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/InvokeServiceFromModuleAssemblyTest.java
@@ -20,15 +20,15 @@
 
 package org.apache.polygene.runtime.mixin;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.mixin.NoopMixin;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
index 47e1203..4ed1eb5 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/JDKMixinTest.java
@@ -39,11 +39,11 @@ import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 /**
  * Assert that JDK classes are usable as Mixins.
@@ -106,7 +106,7 @@ public class JDKMixinTest extends AbstractPolygeneTest
         COMPOSE_IDENTITY );
     private static final List<String> CONCERN_RECORDS = new ArrayList<String>();
 
-    @Before
+    @BeforeEach
     public void beforeEachTest()
     {
         CONCERN_RECORDS.clear();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/MethodInterceptionMixinTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/MethodInterceptionMixinTest.java b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/MethodInterceptionMixinTest.java
index 8885e8a..6dd73b2 100644
--- a/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/MethodInterceptionMixinTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/runtime/mixin/MethodInterceptionMixinTest.java
@@ -23,8 +23,6 @@ package org.apache.polygene.runtime.mixin;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
 import org.apache.polygene.api.concern.ConcernOf;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.injection.scope.This;
@@ -33,8 +31,11 @@ import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 public class MethodInterceptionMixinTest
     extends AbstractPolygeneTest
@@ -50,8 +51,8 @@ public class MethodInterceptionMixinTest
     {
         ServiceReference<SomeService> service = serviceFinder.findService( SomeService.class );
         Collection<String> result1 = service.get().result();
-        assertEquals( "Concern should have been called.", 1, result1.size() );
-        assertEquals( "Concern should have been called.", "Concern1", result1.iterator().next() );
+        assertThat( "Concern should have been called.", result1.size(), equalTo( 1 ) );
+        assertThat( "Concern should have been called.", result1.iterator().next(), equalTo( "Concern1" ) );
     }
 
     @Concerns( { SomeConcern1.class } )


Mime
View raw message