polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [07/14] polygene-java git commit: Migrating to JUnit5. Intermediary build where all tests of phase 1 compiles, but not necessarily succeeds.
Date Sun, 15 Apr 2018 05:55:22 GMT
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
index e1bad60..4f8e1c2 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/AbstractPolygeneTest.java
@@ -34,8 +34,8 @@ import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 
 /**
  * Base class for Composite tests.
@@ -64,7 +64,7 @@ public abstract class AbstractPolygeneTest extends AbstractPolygeneBaseTest
     @Structure
     protected ModuleDescriptor module;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp()
         throws Exception
@@ -87,7 +87,7 @@ public abstract class AbstractPolygeneTest extends AbstractPolygeneBaseTest
         assemble( module );
     }
 
-    @After
+    @AfterEach
     @Override
     public void tearDown()
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/PolygeneUnitExtension.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/PolygeneUnitExtension.java b/core/testsupport/src/main/java/org/apache/polygene/test/PolygeneUnitExtension.java
index d3eb8fe..274bb45 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/PolygeneUnitExtension.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/PolygeneUnitExtension.java
@@ -4,9 +4,7 @@ import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
-import org.junit.jupiter.api.extension.AfterEachCallback;
 import org.junit.jupiter.api.extension.AfterTestExecutionCallback;
-import org.junit.jupiter.api.extension.BeforeEachCallback;
 import org.junit.jupiter.api.extension.BeforeTestExecutionCallback;
 import org.junit.jupiter.api.extension.Extension;
 import org.junit.jupiter.api.extension.ExtensionContext;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
index 358070d..576163c 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractCachePoolTest.java
@@ -21,19 +21,18 @@ package org.apache.polygene.test.cache;
 
 import java.util.Collection;
 import java.util.Random;
-import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.api.constraint.ConstraintViolationException;
+import org.apache.polygene.api.constraint.ValueConstraintViolation;
 import org.apache.polygene.spi.cache.Cache;
 import org.apache.polygene.spi.cache.CachePool;
 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.AnyOf.anyOf;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.hamcrest.core.IsNull.nullValue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * Abstract satisfiedBy with tests for the CachePool interface.
@@ -79,10 +78,10 @@ public abstract class AbstractCachePoolTest
         {
             // expected
             Collection<ValueConstraintViolation> violations = e.constraintViolations();
-            assertEquals( 1, violations.size() );
+            assertThat( violations.size(), equalTo( 1 ) );
             ValueConstraintViolation violation = violations.iterator().next();
-            assertEquals( "not optional", violation.constraint().toString() );
-            assertThat( violation.name(), anyOf(equalTo("cacheId"), equalTo( "arg0" )) );  // depends on whether -parameters was given at compile time.
+            assertThat( violation.constraint().toString(), equalTo( "not optional" ) );
+            assertThat( violation.name(), anyOf( equalTo( "cacheId" ), equalTo( "arg0" ) ) );  // depends on whether -parameters was given at compile time.
         }
     }
 
@@ -101,32 +100,32 @@ public abstract class AbstractCachePoolTest
     @Test
     public void givenEmptyCacheWhenFetchingValueExpectNull()
     {
-        assertNull( cache.get( "1" ) );
+        assertThat( cache.get( "1" ), nullValue() );
     }
 
     @Test
     public void givenCacheWithAValueWhenRequestingThatValueExpectItBack()
     {
         cache.put( "Habba", "Zout" );
-        assertEquals( "Zout", cache.get( "Habba" ) );
+        assertThat( cache.get( "Habba" ), equalTo( "Zout" ) );
     }
 
     @Test
     public void givenCacheWithAValueWhenReplacingValueExpectNewValue()
     {
         cache.put( "Habba", "Zout" );
-        assertEquals( "Zout", cache.get( "Habba" ) );
+        assertThat( cache.get( "Habba" ), equalTo( "Zout" ) );
         cache.put( "Habba", "Zout2" );
-        assertEquals( "Zout2", cache.get( "Habba" ) );
+        assertThat( cache.get( "Habba" ), equalTo( "Zout2" ) );
     }
 
     @Test
     public void givenCacheWithValueWhenDroppingReferenceAndRequestNewCacheAndItsValueExpectItToBeGone()
     {
         cache.put( "Habba", "Zout" );
-        assertEquals( "Zout", cache.get( "Habba" ) );
+        assertThat( cache.get( "Habba" ), equalTo( "Zout" ) );
         cachePool.returnCache( cache );
         cache = cachePool.fetchCache( "1", String.class );
-        assertNull( "Value not missing", cache.get( "Habba" ) );
+        assertThat( "Value not missing", cache.get( "Habba" ), nullValue() );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
index 39fb547..341fd2c 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/cache/AbstractEntityStoreWithCacheTest.java
@@ -25,10 +25,10 @@ import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Assert Cache behaviour when used by an EntityStore.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/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 19f22ab..73adbf5 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
@@ -30,11 +30,11 @@ import org.apache.polygene.api.service.ServiceReference;
 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.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
-import static org.junit.Assert.assertThat;
 
 public abstract class AbstractConfigurationDeserializationTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
index 5e674e9..49623cb 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/AbstractEntityStoreTest.java
@@ -54,16 +54,16 @@ import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.spi.entity.EntityState;
 import org.apache.polygene.spi.entitystore.EntityStore;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
 
 import static java.time.ZoneOffset.UTC;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * Abstract satisfiedBy with tests for the EntityStore interface.
@@ -89,7 +89,7 @@ public abstract class AbstractEntityStoreTest
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown()
     {
         super.tearDown();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
index aa8abf9..bfd30a1 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/AbstractPolygeneMultiLayeredTestWithModel.java
@@ -19,25 +19,14 @@
  */
 package org.apache.polygene.test.entity.model;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.polygene.api.association.NamedAssociation;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.composite.TransientBuilderFactory;
-import org.apache.polygene.api.constraint.ConstraintViolationException;
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.object.ObjectFactory;
-import org.apache.polygene.api.service.ServiceFinder;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.ApplicationDescriptor;
 import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.NoSuchEntityException;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.AssemblyException;
@@ -60,12 +49,6 @@ import org.apache.polygene.test.entity.model.people.PeopleRepository;
 import org.apache.polygene.test.entity.model.people.Person;
 import org.apache.polygene.test.entity.model.people.PhoneNumber;
 import org.apache.polygene.test.entity.model.people.Rent;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 public abstract class AbstractPolygeneMultiLayeredTestWithModel extends AbstractPolygeneBaseTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
index 169b93b..a5ca8fd 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/entity/model/EntityStoreTestSuite.java
@@ -42,12 +42,13 @@ import org.apache.polygene.test.entity.model.people.PeopleRepository;
 import org.apache.polygene.test.entity.model.people.Person;
 import org.apache.polygene.test.entity.model.people.PhoneNumber;
 import org.apache.polygene.test.entity.model.people.Rent;
-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.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredTestWithModel
 {
@@ -82,10 +83,10 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     private Identity unknown2Id;
     private Identity unknown3Id;
 
-    @Before
+    @BeforeEach
     public void setupTestData()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "TestData Generation" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "TestData Generation" ) ))
         {
             testData();
             uow.complete();
@@ -95,7 +96,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void validateAllCountriesPresent()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCountriesPresent" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCountriesPresent" ) ))
         {
             assertThat( peopleRepository.findCountryByCountryCode( "my" ).name().get(), equalTo( "Malaysia" ) );
             assertThat( peopleRepository.findCountryByCountryCode( "us" ).name().get(), equalTo( "United States" ) );
@@ -110,7 +111,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void validateAllCitiesPresent()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCitiesPresent" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllCitiesPresent" ) ))
         {
             assertThat( peopleRepository.findCity( zurichId ).name().get(), equalTo( "Zurich" ) );
             assertThat( peopleRepository.findCity( malmoId ).name().get(), equalTo( "Malmo" ) );
@@ -130,7 +131,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         Currency chf2000 = currencyBuilder.create( 2000, "CHF" );
         Currency myr3000 = currencyBuilder.create( 3000, "MYR" );
         Currency sek9000 = currencyBuilder.create( 9000, "SEK" );
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllAddressesPresent" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllAddressesPresent" ) ))
         {
             Address canary = peopleRepository.findAddress( canaryId );
             assertThat( canary.street().get(), equalTo( "10, CH5A, Jalan Cheras Hartamas" ) );
@@ -179,7 +180,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void validateAllPersonsPresent()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllPersonsPresent" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - validateAllPersonsPresent" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             assertThat( niclas.name().get(), equalTo( "Niclas" ) );
@@ -209,14 +210,14 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             PhoneNumber newNumber = peopleRepository.createPhoneNumber( "+86-185-21320803" );
             niclas.phoneNumbers().put( "Mobile", newNumber );
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingNewNamedAssociationExpectAssociationAdded" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             NamedAssociation<PhoneNumber> numbers = niclas.phoneNumbers();
@@ -235,7 +236,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void whenIteratingNamedAssociationExpectIterationInOrder()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             PhoneNumber newNumber1 = peopleRepository.createPhoneNumber( "+86-185-21320803" );
@@ -246,7 +247,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
             niclas.phoneNumbers().put( "German", newNumber3 );
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenIteratingNamedAssociationExpectIterationToSucceed" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             assertThat( niclas.phoneNumbers(), containsInAnyOrder( "Home", "Chinese", "Swedish", "German" ) );
@@ -256,14 +257,14 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             PhoneNumber newNumber = peopleRepository.createPhoneNumber( "+86-185-21320803" );
             niclas.phoneNumbers().put( "Home", newNumber );
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenTestDataWhenAddingSameNamedAssociationExpectAssociationModified" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             NamedAssociation<PhoneNumber> numbers = niclas.phoneNumbers();
@@ -278,7 +279,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     @Test
     public void whenNullingOptionalAssociationExpectSuccess()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ))
         {
             Person toni = peopleRepository.findPersonByName( "Toni" );
             toni.spouse().set( null );
@@ -286,15 +287,17 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         }
     }
 
-    @Test( expected = ConstraintViolationException.class )
+    @Test
     public void whenNullingNonOptionalAssociationExpectFailure()
     {
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ) )
-        {
-            Person toni = peopleRepository.findPersonByName( "Toni" );
-            toni.nationality().set( null );
-            uow.complete();
-        }
+        assertThrows( ConstraintViolationException.class, () -> {
+            try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenNullingOptionalAssociationExpectSuccess" ) ))
+            {
+                Person toni = peopleRepository.findPersonByName( "Toni" );
+                toni.nationality().set( null );
+                uow.complete();
+            }
+        } );
     }
 
     @Test
@@ -308,7 +311,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         Identity malaysiaId;
         Identity canaryId;
         Identity despairStId;
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             PhoneNumber newNumber1 = peopleRepository.createPhoneNumber( "+86-185-21320803" );
@@ -324,10 +327,11 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
 
             City zurich = peopleRepository.findCity( zurichId );
             Country switzerland = peopleRepository.findCountryByCountryCode( "ch" );
-            niclas.movedToNewAddress( "DespairStreet 12A", "43HQ21", zurich, switzerland, objectFactory.newObject( Rent.Builder.class ).create( 1000, "EUR" ) );
+            niclas.movedToNewAddress( "DespairStreet 12A", "43HQ21", zurich, switzerland, objectFactory.newObject( Rent.Builder.class )
+                .create( 1000, "EUR" ) );
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             assertThat( niclas.nationality().get().name().get(), equalTo( "Sweden" ) );
@@ -338,13 +342,13 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
             malaysiaId = niclas.oldAddresses().get( 0 ).country().get().identity().get();
             switzerlandId = niclas.address().get().country().get().identity().get();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             uow.remove( niclas );
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
         }
@@ -352,7 +356,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findPhoneNumberById( homePhoneId );
         }
@@ -360,7 +364,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findPhoneNumberById( chinesePhoneId );
         }
@@ -368,7 +372,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findPhoneNumberById( swedishPhoneId );
         }
@@ -376,7 +380,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findPhoneNumberById( germanPhoneId );
         }
@@ -384,7 +388,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findAddress( canaryId );
         }
@@ -392,7 +396,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findAddress( despairStId );
         }
@@ -400,7 +404,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         {
             // expected
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - whenRemovingEntityExpectAggregatedEntitiesToBeRemoved" ) ))
         {
             peopleRepository.findCountryByIdentity( switzerlandId );
             peopleRepository.findCountryByIdentity( malaysiaId );
@@ -412,10 +416,12 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
         }
     }
 
-    @Test( expected = IllegalStateException.class )
+    @Test
     public void whenNoActiveUnitOfWorkExpectIllegalStateException()
     {
-        peopleRepository.findCountryByIdentity( switzerlandId );
+        assertThrows( IllegalStateException.class, () ->
+            peopleRepository.findCountryByIdentity( switzerlandId )
+        );
     }
 
     @Test
@@ -423,7 +429,7 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
     {
         Currency.Builder currencyBuilder = transientBuilderFactory.newTransient( Currency.Builder.class );
         Identity willId;
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ))
         {
             Person peter = peopleRepository.findPersonByName( "Peter" );
             Person kalle = peopleRepository.findPersonByName( "Kalle" );
@@ -442,14 +448,14 @@ public abstract class EntityStoreTestSuite extends AbstractPolygeneMultiLayeredT
             willId = will.identity().get();
             uow.complete();
         }
-        try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ) )
+        try (UnitOfWork uow = unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase( "Test - givenEntityInheritanceWhenStoreRetrieveExpectSuccess" ) ))
         {
             Person kalle = peopleRepository.findPersonByName( "Kalle" );
             Person oscar = peopleRepository.findPersonByName( "Oscar" );
             Person niclas = peopleRepository.findPersonByName( "Niclas" );
             Person andreas = peopleRepository.findPersonByName( "Andreas" );
 
-            Will will = legalService.findWillById(willId);
+            Will will = legalService.findWillById( willId );
             List<WillAmount> amounts = will.amounts().get();
             List<WillPercentage> percentages = will.percentages().get();
             List<WillItem> items = will.items().get();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractComplexQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractComplexQueryTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractComplexQueryTest.java
index 78eb77e..404f5bc 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractComplexQueryTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractComplexQueryTest.java
@@ -24,11 +24,10 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import org.apache.polygene.api.injection.scope.Structure;
-import org.apache.polygene.api.structure.Module;
-import org.junit.Test;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.query.Query;
 import org.apache.polygene.api.query.QueryBuilder;
+import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.spi.query.IndexExporter;
 import org.apache.polygene.test.model.Address;
@@ -36,6 +35,7 @@ import org.apache.polygene.test.model.Person;
 import org.apache.polygene.test.model.Protocol;
 import org.apache.polygene.test.model.QueryParam;
 import org.apache.polygene.test.model.URL;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.polygene.api.query.QueryExpressions.contains;
 import static org.apache.polygene.api.query.QueryExpressions.containsAll;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractEntityFinderTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractEntityFinderTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractEntityFinderTest.java
index 9e0b845..094f96b 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractEntityFinderTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractEntityFinderTest.java
@@ -41,8 +41,8 @@ import org.apache.polygene.test.model.Female;
 import org.apache.polygene.test.model.Male;
 import org.apache.polygene.test.model.Nameable;
 import org.apache.polygene.test.model.Person;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static java.util.stream.Collectors.toList;
 import static org.apache.polygene.api.query.QueryExpressions.and;
@@ -58,7 +58,8 @@ import static org.apache.polygene.api.query.QueryExpressions.orderBy;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 import static org.apache.polygene.api.query.QueryExpressions.variable;
 import static org.apache.polygene.test.indexing.NameableAssert.assertNames;
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
 
 /**
  * Abstract satisfiedBy with tests for the EntityFinder interface.
@@ -87,10 +88,9 @@ public abstract class AbstractEntityFinderTest
     @Structure
     Module moduleInstance;
 
-
     private EntityFinder entityFinder;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp()
         throws Exception
@@ -330,7 +330,7 @@ public abstract class AbstractEntityFinderTest
             NO_SORTING2,
             NO_FIRST_RESULT, 2,
             NO_VARIABLES );
-        assertEquals( "2 identities", 2, references.count() );
+        assertThat( "2 identities", references.count(), equalTo( 2 ) );
     }
 
     @Test
@@ -343,7 +343,7 @@ public abstract class AbstractEntityFinderTest
             NO_SORTING2,
             3, 2,
             NO_VARIABLES );
-        assertEquals( "2 identitities", 2, references.count() );
+        assertThat( "2 identitities", references.count(), equalTo( 2 ) );
     }
 
     @Test
@@ -443,5 +443,4 @@ public abstract class AbstractEntityFinderTest
             variables ).collect( toList() );
         assertNames( entities, "Gaming" );
     }
-
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractNamedQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractNamedQueryTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractNamedQueryTest.java
index a2b269e..f1e0aaa 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractNamedQueryTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractNamedQueryTest.java
@@ -34,16 +34,16 @@ import org.apache.polygene.test.model.Female;
 import org.apache.polygene.test.model.Male;
 import org.apache.polygene.test.model.Nameable;
 import org.apache.polygene.test.model.Person;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.polygene.api.query.QueryExpressions.orderBy;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 import static org.apache.polygene.test.indexing.NameableAssert.verifyOrderedResults;
 import static org.apache.polygene.test.indexing.NameableAssert.verifyUnorderedResults;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 /**
  * Abstract satisfiedBy with tests for named queries against Index/Query engines.
@@ -52,11 +52,11 @@ public abstract class AbstractNamedQueryTest
     extends AbstractAnyQueryTest
 {
     @Structure
-    Module moduleInstance;
+    private Module moduleInstance;
 
     protected final Map<String, Predicate<Composite>> queries = new HashMap<>();
 
-    @Before
+    @BeforeEach
     public void assembleQueryStrings()
     {
         String[] query = queryStrings();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
index c5d1d99..d060a85 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/AbstractQueryTest.java
@@ -46,8 +46,8 @@ import org.apache.polygene.test.model.Male;
 import org.apache.polygene.test.model.Nameable;
 import org.apache.polygene.test.model.Person;
 import org.apache.polygene.test.model.QueryParam;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 import static java.time.ZoneOffset.UTC;
 import static org.apache.polygene.api.query.QueryExpressions.and;
@@ -68,9 +68,10 @@ import static org.apache.polygene.api.query.QueryExpressions.orderBy;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
 import static org.apache.polygene.test.indexing.NameableAssert.verifyOrderedResults;
 import static org.apache.polygene.test.indexing.NameableAssert.verifyUnorderedResults;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 /**
  * Abstract satisfiedBy with tests for simple queries against Index/Query engines.
@@ -379,34 +380,42 @@ public abstract class AbstractQueryTest
         assertThat( query.find().name().get(), is( equalTo( "Gaming" ) ) );
     }
 
-    @Test( expected = NotQueryableException.class )
+    @Test
     public void script25()
     {
-        this.moduleInstance.newQueryBuilder( File.class );
+        assertThrows( NotQueryableException.class, () ->
+            this.moduleInstance.newQueryBuilder( File.class )
+        );
     }
 
-    @Test( expected = NotQueryableException.class )
+    @Test
     public void script26()
     {
-        QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
-        Person person = templateFor( Person.class );
-        qb.where( eq( person.personalWebsite().get().file().get().value(), "some/path" ) );
+        assertThrows( NotQueryableException.class, () -> {
+            QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
+            Person person = templateFor( Person.class );
+            qb.where( eq( person.personalWebsite().get().file().get().value(), "some/path" ) );
+        } );
     }
 
-    @Test( expected = NotQueryableException.class )
+    @Test
     public void script27()
     {
-        QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
-        Person person = templateFor( Person.class );
-        qb.where( eq( person.personalWebsite().get().host().get().value(), "polygene.apache.org" ) );
+        assertThrows( NotQueryableException.class, () -> {
+            QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
+            Person person = templateFor( Person.class );
+            qb.where( eq( person.personalWebsite().get().host().get().value(), "polygene.apache.org" ) );
+        } );
     }
 
-    @Test( expected = NotQueryableException.class )
+    @Test
     public void script28()
     {
-        QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
-        Person person = templateFor( Person.class );
-        qb.where( eq( person.personalWebsite().get().port().get().value(), 8080 ) );
+        assertThrows( NotQueryableException.class, () -> {
+            QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
+            Person person = templateFor( Person.class );
+            qb.where( eq( person.personalWebsite().get().port().get().value(), 8080 ) );
+        } );
     }
 
     @Test
@@ -425,7 +434,7 @@ public abstract class AbstractQueryTest
     }
 
     @Test
-    @Ignore( "Wait till 1.1?" )
+    @Disabled( "Wait till 1.1?" )
     // Paul: I don't understand this test
     @SuppressWarnings( "unchecked" )
     public void script30()
@@ -439,7 +448,7 @@ public abstract class AbstractQueryTest
     }
 
     @Test
-    @Ignore( "Equality on Property<Map<?,?>> not implemented" )
+    @Disabled( "Equality on Property<Map<?,?>> not implemented" )
     public void script31()
     {
         QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );
@@ -508,7 +517,7 @@ public abstract class AbstractQueryTest
     }
 
     @Test
-    @Ignore( "Traversing of NamedAssociations is not implemented" )
+    @Disabled( "Traversing of NamedAssociations is not implemented" )
     public void script37()
     {
         QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/NameableAssert.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/NameableAssert.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/NameableAssert.java
index 58dde55..5ba5896 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/NameableAssert.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/NameableAssert.java
@@ -32,10 +32,10 @@ import org.apache.polygene.api.entity.EntityReference;
 import org.apache.polygene.api.identity.Identity;
 import org.apache.polygene.test.model.Nameable;
 
+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;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class NameableAssert
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
index 8c553fc..bd3cf9a 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/AbstractMultiLayeredIndexingTest.java
@@ -34,8 +34,8 @@ import org.apache.polygene.api.usecase.UsecaseBuilder;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.test.indexing.TestData;
 import org.apache.polygene.test.model.assembly.ApplicationAssembler;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public abstract class AbstractMultiLayeredIndexingTest
 {
@@ -71,7 +71,7 @@ public abstract class AbstractMultiLayeredIndexingTest
         AbstractMultiLayeredIndexingTest.indexingAssembler = indexingAssembler;
     }
 
-    @Before
+    @BeforeEach
     public void setup()
         throws ActivationException
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case1.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case1.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case1.java
index 8477b18..8c7de00 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case1.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case1.java
@@ -30,8 +30,8 @@ import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.test.model.Male;
 import org.apache.polygene.test.model.Person;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 public class Suite1Case1
     implements TestCase

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case2.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case2.java b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case2.java
index 6c54831..b1450ee 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case2.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/indexing/layered/Suite1Case2.java
@@ -31,8 +31,8 @@ import org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation;
 import org.apache.polygene.test.model.Male;
 import org.apache.polygene.test.model.Person;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
 
 public class Suite1Case2
     implements TestCase

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/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 e9e0c1c..2e21e79 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
@@ -49,17 +49,17 @@ import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneBaseTest;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.util.JmxFixture;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static java.util.stream.Collectors.toList;
 import static org.apache.polygene.api.unitofwork.concern.UnitOfWorkPropagation.Propagation.MANDATORY;
 import static org.apache.polygene.api.usecase.UsecaseBuilder.newUsecase;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNot.not;
 import static org.hamcrest.core.StringContains.containsString;
-import static org.junit.Assert.assertThat;
 
 // TODO Test errors
 public abstract class AbstractPolygeneMetricsTest extends AbstractPolygeneBaseTest

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
index 174d70a..db4405b 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/metrics/AbstractTimingCaptureTest.java
@@ -30,10 +30,10 @@ import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.Assemblers;
 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.Is.is;
-import static org.junit.Assert.assertThat;
 
 public abstract class AbstractTimingCaptureTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
index e0ecd6e..bba72d4 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractCollectionSerializationTest.java
@@ -44,10 +44,11 @@ import org.apache.polygene.api.type.ValueType;
 import org.apache.polygene.api.value.ValueBuilder;
 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.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 
 /**
  * Assert that Serialization behaviour on Collections and Maps is correct.
@@ -101,7 +102,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.BYTE );
         List<Byte> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( byteCollection(), list );
+        assertThat( list, equalTo( byteCollection() ) );
     }
 
     @Test
@@ -112,7 +113,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.setOf( ValueType.BYTE );
         Set<Byte> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( new LinkedHashSet<>( byteCollection() ), list );
+        assertThat( list, equalTo( new LinkedHashSet<>( byteCollection() ) ) );
     }
 
     @Test
@@ -123,7 +124,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.CHARACTER );
         List<Character> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( characterCollection(), list );
+        assertThat( list, equalTo( characterCollection() ) );
     }
 
     @Test
@@ -134,7 +135,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.SHORT );
         List<Short> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( shortCollection(), list );
+        assertThat( list, equalTo( shortCollection() ) );
     }
 
     @Test
@@ -145,7 +146,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.INTEGER );
         List<Integer> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( integerCollection(), list );
+        assertThat( list, equalTo( integerCollection() ) );
     }
 
     @Test
@@ -156,7 +157,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.LONG );
         List<Long> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( longCollection(), list );
+        assertThat( list, equalTo( longCollection() ) );
     }
 
     @Test
@@ -167,7 +168,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.FLOAT );
         List<Float> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( floatCollection(), list );
+        assertThat( list, equalTo( floatCollection() ) );
     }
 
     @Test
@@ -178,7 +179,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.DOUBLE );
         List<Double> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( doubleCollection(), list );
+        assertThat( list, equalTo( doubleCollection() ) );
     }
 
     @Test
@@ -189,7 +190,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( ValueType.BIG_INTEGER );
         List<BigInteger> list = serialization.deserialize( module, collectionType, output );
-        assertEquals( bigIntegerCollection(), list );
+        assertThat( list, equalTo( bigIntegerCollection() ) );
     }
 
     @Test
@@ -200,7 +201,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.collectionOf( ValueType.BIG_DECIMAL );
         Collection<BigDecimal> collection = serialization.deserialize( module, collectionType, output );
-        assertEquals( bigDecimalCollection(), collection );
+        assertThat( collection, equalTo( bigDecimalCollection() ) );
     }
 
     @Test
@@ -211,7 +212,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         MapType mapType = MapType.of( ValueType.STRING, ValueType.BYTE );
         Map<String, Byte> value = serialization.deserialize( module, mapType, output );
-        assertEquals( stringByteMap(), value );
+        assertThat( value, equalTo( stringByteMap() ) );
     }
 
     @Test
@@ -223,7 +224,7 @@ public class AbstractCollectionSerializationTest
         CollectionType collectionType = CollectionType.listOf( ValueType.STRING );
         MapType mapType = MapType.of( ValueType.STRING, collectionType );
         Map<String, List<String>> value = serialization.deserialize( module, mapType, output );
-        assertEquals( stringMultiMap(), value );
+        assertThat( value, equalTo( stringMultiMap() ) );
     }
 
     @Test
@@ -234,7 +235,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType collectionType = CollectionType.listOf( MapType.of( ValueType.STRING, ValueType.STRING ) );
         List<Map<String, String>> value = serialization.deserialize( module, collectionType, output );
-        assertEquals( stringListOfMaps(), value );
+        assertThat( value, equalTo( stringListOfMaps() ) );
     }
 
     @Test
@@ -246,7 +247,7 @@ public class AbstractCollectionSerializationTest
         ValueCompositeType valueType = module.valueDescriptor( SomeValue.class.getName() ).valueType();
         CollectionType collectionType = CollectionType.listOf( valueType );
         List<SomeValue> value = serialization.deserialize( module, collectionType, output );
-        assertEquals( valueCompositesList(), value );
+        assertThat( value, equalTo( valueCompositesList() ) );
     }
 
     @Test
@@ -257,7 +258,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         CollectionType valueType = CollectionType.setOf( EnumType.of( SomeEnum.class ) );
         Set<SomeEnum> value = serialization.deserialize( module, valueType, output );
-        assertEquals( enumSet, value );
+        assertThat( value, equalTo( enumSet ) );
     }
 
     @Test
@@ -272,7 +273,7 @@ public class AbstractCollectionSerializationTest
         System.out.println( output );
         MapType valueType = MapType.of( EnumType.of( SomeEnum.class ), ValueType.of( Integer.class ) );
         Map<SomeEnum, Number> value = serialization.deserialize( module, valueType, output );
-        assertEquals( enumMap, value );
+        assertThat( value, equalTo( enumMap ) );
     }
 
     private ArrayList<Byte> byteCollection()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractConvertersSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractConvertersSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractConvertersSerializationTest.java
index 254196f..c74f8dd 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractConvertersSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractConvertersSerializationTest.java
@@ -26,10 +26,10 @@ import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.value.ValueBuilder;
 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.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
 
 public abstract class AbstractConvertersSerializationTest extends AbstractPolygeneTest
 {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractPlainValueSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractPlainValueSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractPlainValueSerializationTest.java
index 4b34b64..138f12d 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractPlainValueSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractPlainValueSerializationTest.java
@@ -42,15 +42,15 @@ import org.apache.polygene.api.type.ValueType;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.spi.serialization.SerializationSettings;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.startsWith;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * Assert that Serialization behaviour on plain values is correct.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
index 9f0d87c..2cda756 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/serialization/AbstractValueCompositeSerializationTest.java
@@ -55,18 +55,17 @@ import org.apache.polygene.api.value.ValueComposite;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.test.AbstractPolygeneTest;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestName;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.apache.polygene.api.usecase.UsecaseBuilder.newUsecase;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 /**
  * Assert that Serialization behaviour on ValueComposites is correct.
@@ -75,19 +74,17 @@ import static org.junit.Assert.assertThat;
 public abstract class AbstractValueCompositeSerializationTest
     extends AbstractPolygeneTest
 {
-    @Rule
-    public TestName testName = new TestName();
 
-    @Before
-    public void before()
+    @BeforeEach
+    public void before( TestInfo info )
     {
-        System.out.println( "# BEGIN " + testName.getMethodName() );
+        System.out.println( "# BEGIN " + info.getDisplayName() );
     }
 
-    @After
-    public void after()
+    @AfterEach
+    public void after( TestInfo info )
     {
-        System.out.println( "# END " + testName.getMethodName() );
+        System.out.println( "# END " + info.getDisplayName() );
     }
 
     @Override
@@ -248,7 +245,7 @@ public abstract class AbstractValueCompositeSerializationTest
     }
 
     @Test
-    @Ignore( "JSONEntityState cannot handle polymorphic deserialization" )
+    @Disabled( "JSONEntityState cannot handle polymorphic deserialization" )
     // TODO Entity == Identity + Value
     // JSONEntityState does not allow for polymorphic serialization
     public void valueAndEntityTypeEquality()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/util/Assume.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/Assume.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/Assume.java
index ec65719..6261d22 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/Assume.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/util/Assume.java
@@ -25,16 +25,15 @@ import java.net.NetworkInterface;
 import java.net.Socket;
 import java.net.SocketException;
 import java.util.Enumeration;
+import org.opentest4j.TestAbortedException;
 
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsNull.notNullValue;
-import static org.hamcrest.core.StringStartsWith.startsWith;
+import static org.junit.jupiter.api.Assumptions.assumeFalse;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 /**
  * A set of methods useful for stating assumptions about the conditions in which a test is meaningful.
  */
 public class Assume
-    extends org.junit.Assume
 {
     /**
      * If called on a JDK which version is different than the given one, the test will halt and be ignored.
@@ -42,7 +41,7 @@ public class Assume
      */
     public static void assumeJavaVersion( int version )
     {
-        assumeThat( System.getProperty( "java.version" ), startsWith( "1." + version ) );
+        assumeTrue( System.getProperty( "java.version" ).startsWith( "1." + version ) );
     }
 
     /**
@@ -62,13 +61,13 @@ public class Assume
         {
             assumeFalse( GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance() );
             String display = System.getenv( "DISPLAY" );
-            assumeThat( display, is( notNullValue() ) );
+            assumeTrue( display != null );
             assumeTrue( display.length() > 0 );
         }
         catch( UnsatisfiedLinkError e )
         {
             // assuming that this is caused due to missing video subsystem, or similar
-            assumeNoException( "Grahics system is missing?", e );
+            throw new TestAbortedException( "Grahics system is missing?", e );
         }
     }
 
@@ -80,12 +79,12 @@ public class Assume
         try
         {
             Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();
-            assumeThat( ifaces, is( notNullValue() ) );
+            assumeTrue( ifaces != null );
             assumeTrue( ifaces.hasMoreElements() );
         }
         catch( SocketException ex )
         {
-            assumeNoException( ex );
+            throw new TestAbortedException( ex.getMessage(), ex );
         }
     }
 
@@ -111,7 +110,7 @@ public class Assume
         }
         catch( IOException ex )
         {
-            assumeNoException( ex );
+            throw new TestAbortedException( ex.getMessage(), ex );
         }
     }
 
@@ -123,7 +122,7 @@ public class Assume
     public static String assumeSystemPropertyNotNull( String key )
     {
         String property = System.getProperty( key );
-        assumeNotNull( property );
+        assumeTrue( property != null );
         return property;
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/util/JmxFixture.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/JmxFixture.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/JmxFixture.java
index a8c106c..9e30387 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/JmxFixture.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/util/JmxFixture.java
@@ -17,23 +17,23 @@
  */
 package org.apache.polygene.test.util;
 
-import org.hamcrest.Matcher;
-import org.junit.Assert;
-
+import java.lang.management.ManagementFactory;
+import java.util.List;
 import javax.management.JMException;
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-import java.lang.management.ManagementFactory;
-import java.util.List;
+import org.hamcrest.Matcher;
 
 import static java.util.stream.Collectors.toList;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * JMX Test Fixture.
  */
-public class JmxFixture extends Assert {
-
+public class JmxFixture
+{
     private final MBeanServer server;
     private final String prefix;
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/util/NotYetImplemented.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/NotYetImplemented.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/NotYetImplemented.java
index 35dd7e2..0c9fe94 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/NotYetImplemented.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/util/NotYetImplemented.java
@@ -22,10 +22,10 @@ import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import junit.framework.AssertionFailedError;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
+//import junit.framework.AssertionFailedError;
+//import org.junit.rules.TestRule;
+//import org.junit.runner.Description;
+//import org.junit.runners.model.Statement;
 
 /**
  * JUnit annotation and rule to mark not yet implemented tests.
@@ -41,40 +41,40 @@ public @interface NotYetImplemented
 {
     String reason() default "";
 
-    class Rule implements TestRule
-    {
-        @Override
-        public Statement apply( Statement base, Description description )
-        {
-            if( description.getAnnotation( NotYetImplemented.class ) == null )
-            {
-                return base;
-            }
-            return new Statement()
-            {
-                @Override
-                public void evaluate() throws Throwable
-                {
-                    boolean passed = false;
-                    try
-                    {
-                        base.evaluate();
-                        passed = true;
-                    }
-                    catch( Throwable ex )
-                    {
-                        System.err.println( "Not yet implemented test expectedly failed" );
-                        ex.printStackTrace( System.err );
-                    }
-                    if( passed )
-                    {
-                        throw new AssertionFailedError(
-                            "Test " + description.getDisplayName()
-                            + " is annotated as not yet implemented, expected it to fail but it passed."
-                        );
-                    }
-                }
-            };
-        }
-    }
+//    class Rule implements TestRule
+//    {
+//        @Override
+//        public Statement apply( Statement base, Description description )
+//        {
+//            if( description.getAnnotation( NotYetImplemented.class ) == null )
+//            {
+//                return base;
+//            }
+//            return new Statement()
+//            {
+//                @Override
+//                public void evaluate() throws Throwable
+//                {
+//                    boolean passed = false;
+//                    try
+//                    {
+//                        base.evaluate();
+//                        passed = true;
+//                    }
+//                    catch( Throwable ex )
+//                    {
+//                        System.err.println( "Not yet implemented test expectedly failed" );
+//                        ex.printStackTrace( System.err );
+//                    }
+//                    if( passed )
+//                    {
+//                        throw new AssertionFailedError(
+//                            "Test " + description.getDisplayName()
+//                            + " is annotated as not yet implemented, expected it to fail but it passed."
+//                        );
+//                    }
+//                }
+//            };
+//        }
+//    }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/util/RepeatRule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/RepeatRule.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/RepeatRule.java
deleted file mode 100644
index 50e019a..0000000
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/RepeatRule.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.test.util;
-
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * JUnit Rule to run tests repeatedly.
- *
- * <p>To repeat a complete test class:</p>
- * <pre>@ClassRule public static final RepeatRule REPEAT = new RepeatRule( 10 );</pre>
- *
- * <p>To repeat each test on the same test class instance:</p>
- * <pre>@Rule public final RepeatRule repeat = new RepeatRule( 10 );</pre>
- */
-public class RepeatRule
-    implements TestRule
-{
-    private final int count;
-
-    public RepeatRule( int count )
-    {
-        this.count = count;
-    }
-
-    @Override
-    public Statement apply( final Statement base, Description description )
-    {
-        return new Statement()
-        {
-            @Override
-            public void evaluate()
-                throws Throwable
-            {
-                for( int repeat = 0; repeat < count; repeat++ )
-                {
-                    base.evaluate();
-                }
-            }
-        };
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/main/java/org/apache/polygene/test/util/RetryRule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/RetryRule.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/RetryRule.java
deleted file mode 100644
index 84768e1..0000000
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/RetryRule.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.test.util;
-
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * JUnit Rule to retry tests.
- * Useful for flaky tests.
- */
-public class RetryRule implements TestRule
-{
-    private static final int MAX_DEFAULT = 3;
-
-    private final int max;
-    private int attempts = 0;
-
-    public RetryRule()
-    {
-        this( MAX_DEFAULT );
-    }
-
-    public RetryRule( int max )
-    {
-        this.max = max;
-    }
-
-    @Override
-    public Statement apply( Statement base, Description description )
-    {
-        return new Statement()
-        {
-            @Override
-            public void evaluate() throws Throwable
-            {
-                attempts++;
-                try
-                {
-                    base.evaluate();
-                }
-                catch( Throwable ex )
-                {
-                    if( attempts <= max )
-                    {
-                        evaluate();
-                    }
-                    else
-                    {
-                        throw ex;
-                    }
-                }
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/test/java/org/apache/polygene/test/cache/RetryRuleTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/test/java/org/apache/polygene/test/cache/RetryRuleTest.java b/core/testsupport/src/test/java/org/apache/polygene/test/cache/RetryRuleTest.java
deleted file mode 100644
index 019b5e9..0000000
--- a/core/testsupport/src/test/java/org/apache/polygene/test/cache/RetryRuleTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.test.cache;
-
-import org.apache.polygene.test.util.RetryRule;
-import org.junit.Rule;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-public class RetryRuleTest
-{
-    @Rule public RetryRule retry = new RetryRule( 3 );
-
-    static int count = 0;
-
-    @Test
-    public void test()
-    {
-        count++;
-        assertThat( count, is( 3 ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6ae17138/core/testsupport/src/test/java/org/apache/polygene/test/junit5/Junit5Test.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/test/java/org/apache/polygene/test/junit5/Junit5Test.java b/core/testsupport/src/test/java/org/apache/polygene/test/junit5/Junit5Test.java
index 9d6d05c..af0ce6c 100644
--- a/core/testsupport/src/test/java/org/apache/polygene/test/junit5/Junit5Test.java
+++ b/core/testsupport/src/test/java/org/apache/polygene/test/junit5/Junit5Test.java
@@ -1,13 +1,13 @@
 package org.apache.polygene.test.junit5;
 
+import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.test.PolygeneUnitExtension;
 import org.apache.polygene.test.model.Cat;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.runner.RunWith;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
@@ -20,7 +20,7 @@ public class Junit5Test
 {
 
     @RegisterExtension
-    PolygeneUnitExtension polygene = PolygeneUnitExtension.forModule( module -> {
+    public PolygeneUnitExtension polygene = PolygeneUnitExtension.forModule( module -> {
         module.values(Cat.class );
     } ).build();
 
@@ -31,6 +31,7 @@ public class Junit5Test
     public void givenPolygeneWhenInstantiatingCatExpectCatInstantiation()
     {
         ValueBuilder<Cat> builder = vbf.newValueBuilder( Cat.class );
+        builder.prototype().identity().set( StringIdentity.identityOf( "123" ) );
         builder.prototype().name().set( "Kim" );
         Cat cat = builder.newInstance();
 


Mime
View raw message