syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [5/5] syncope git commit: [SYNCOPE-1208] Now using JUnit 5 (with temporary junit-platform-surefire-provider 1.1.0-SNAPSHOT)
Date Mon, 02 Oct 2017 13:29:25 GMT
[SYNCOPE-1208] Now using JUnit 5 (with temporary junit-platform-surefire-provider 1.1.0-SNAPSHOT)


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/45ad6f55
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/45ad6f55
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/45ad6f55

Branch: refs/heads/master
Commit: 45ad6f5595e4063a4840f476616682d49e59d164
Parents: 17a8eb5
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Oct 2 15:29:11 2017 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Oct 2 15:29:11 2017 +0200

----------------------------------------------------------------------
 client/cli/pom.xml                              |   4 +-
 .../client/cli/commands/MigrateTest.java        |  10 +-
 .../client/cli/util/CommandUtilsTest.java       |   8 +-
 .../client/cli/util/JasyptUtilsTest.java        |   4 +-
 client/enduser/pom.xml                          |   4 +-
 .../enduser/util/UserRequestValidatorTest.java  |   6 +-
 client/lib/pom.xml                              |  24 +++
 .../syncope/client/lib/ConcurrencyTest.java     |   4 +-
 common/lib/pom.xml                              |   4 +-
 .../common/lib/collections/IteratorChain.java   |   7 +-
 .../syncope/common/lib/AnyOperationsTest.java   |   4 +-
 .../org/apache/syncope/common/lib/JAXBTest.java |   6 +-
 .../org/apache/syncope/common/lib/JSONTest.java |   6 +-
 .../lib/search/SyncopeFiqlParserTest.java       |   6 +-
 core/persistence-api/pom.xml                    |   4 +-
 .../api/search/SearchCondConverterTest.java     |   4 +-
 core/persistence-jpa/pom.xml                    |   4 +-
 .../core/persistence/jpa/AbstractTest.java      |   7 +-
 .../persistence/jpa/inner/AnyObjectTest.java    |   8 +-
 .../persistence/jpa/inner/AnySearchTest.java    |  10 +-
 .../persistence/jpa/inner/AnyTypeClassTest.java |  10 +-
 .../core/persistence/jpa/inner/AnyTypeTest.java |  41 +++--
 .../core/persistence/jpa/inner/ConfTest.java    |  12 +-
 .../persistence/jpa/inner/ConnInstanceTest.java |  36 ++--
 .../persistence/jpa/inner/DerSchemaTest.java    |  22 +--
 .../core/persistence/jpa/inner/DomainTest.java  |  12 +-
 .../core/persistence/jpa/inner/GroupTest.java   |  16 +-
 .../persistence/jpa/inner/MailTemplateTest.java |   8 +-
 .../persistence/jpa/inner/MultitenancyTest.java |  20 +--
 .../persistence/jpa/inner/NotificationTest.java |   8 +-
 .../persistence/jpa/inner/PlainAttrTest.java    |  26 +--
 .../persistence/jpa/inner/PlainSchemaTest.java  |  55 +++---
 .../core/persistence/jpa/inner/PolicyTest.java  |  20 +--
 .../core/persistence/jpa/inner/RealmTest.java   |  29 +--
 .../jpa/inner/RelationshipTypeTest.java         |  24 +--
 .../jpa/inner/ReportTemplateTest.java           |   8 +-
 .../core/persistence/jpa/inner/ReportTest.java  |   8 +-
 .../persistence/jpa/inner/ResourceTest.java     | 176 ++++++++++---------
 .../core/persistence/jpa/inner/RoleTest.java    |  10 +-
 .../jpa/inner/SecurityQuestionTest.java         |   8 +-
 .../persistence/jpa/inner/TaskExecTest.java     |   6 +-
 .../core/persistence/jpa/inner/TaskTest.java    |  12 +-
 .../core/persistence/jpa/inner/UserTest.java    |  59 ++++---
 .../persistence/jpa/inner/VirSchemaTest.java    |  22 +--
 .../persistence/jpa/outer/AccessTokenTest.java  |   8 +-
 .../persistence/jpa/outer/AnySearchTest.java    |   8 +-
 .../persistence/jpa/outer/AnyTypeClassTest.java |   8 +-
 .../core/persistence/jpa/outer/AnyTypeTest.java |  10 +-
 .../core/persistence/jpa/outer/ConfTest.java    |   6 +-
 .../jpa/outer/ConnInstanceHistoryConfTest.java  |  10 +-
 .../persistence/jpa/outer/ConnInstanceTest.java |  12 +-
 .../persistence/jpa/outer/DynRealmTest.java     |  12 +-
 .../core/persistence/jpa/outer/GroupTest.java   |  41 +++--
 .../persistence/jpa/outer/PlainAttrTest.java    |   6 +-
 .../persistence/jpa/outer/PlainSchemaTest.java  |  42 ++---
 .../core/persistence/jpa/outer/RealmTest.java   |   8 +-
 .../core/persistence/jpa/outer/ReportTest.java  |  33 ++--
 .../jpa/outer/ResourceHistoryConfTest.java      |  10 +-
 .../persistence/jpa/outer/ResourceTest.java     |  22 +--
 .../core/persistence/jpa/outer/RoleTest.java    |  10 +-
 .../jpa/outer/SecurityQuestionTest.java         |   4 +-
 .../core/persistence/jpa/outer/TaskTest.java    |  12 +-
 .../core/persistence/jpa/outer/UserTest.java    |  22 +--
 .../persistence/jpa/outer/VirSchemaTest.java    |  12 +-
 .../jpa/outer/XMLContentExporterTest.java       |   6 +-
 core/provisioning-java/pom.xml                  |   4 +-
 .../core/provisioning/java/AbstractTest.java    |   7 +-
 .../provisioning/java/ConnectorManagerTest.java |   8 +-
 .../core/provisioning/java/DerAttrTest.java     |  12 +-
 .../java/IntAttrNameParserTest.java             |  12 +-
 .../provisioning/java/MailTemplateTest.java     |   8 +-
 .../core/provisioning/java/MappingTest.java     |   6 +-
 .../java/ResourceDataBinderTest.java            |  14 +-
 core/spring/pom.xml                             |   8 +-
 .../core/spring/security/EncryptorTest.java     |  10 +-
 .../spring/security/PasswordGeneratorTest.java  |  35 ++--
 fit/console-reference/pom.xml                   |   4 +-
 fit/core-reference/pom.xml                      |   4 +-
 .../org/apache/syncope/fit/AbstractITCase.java  |  15 +-
 .../org/apache/syncope/fit/cli/CLIITCase.java   |  12 +-
 .../fit/console/AbstractConsoleITCase.java      |   7 +-
 .../fit/console/AbstractTypesITCase.java        |   4 +-
 .../syncope/fit/console/AjaxBrowseITCase.java   |   2 +-
 .../fit/console/AjaxPalettePanelITCase.java     |   4 +-
 .../fit/console/AjaxTextFieldITCase.java        |   6 +-
 .../syncope/fit/console/AnyObjectsITCase.java   |   8 +-
 .../fit/console/AnyTypeClassesITCase.java       |   6 +-
 .../syncope/fit/console/AnyTypesITCase.java     |   6 +-
 .../syncope/fit/console/BulkActionITCase.java   |  10 +-
 .../fit/console/DisplayAttributesITCase.java    |   6 +-
 .../syncope/fit/console/GroupsITCase.java       |  10 +-
 .../apache/syncope/fit/console/LogsITCase.java  |   8 +-
 .../fit/console/NotificationsITCase.java        |  10 +-
 .../syncope/fit/console/ParametersITCase.java   |  12 +-
 .../syncope/fit/console/PoliciesITCase.java     |  79 ++++-----
 .../syncope/fit/console/RealmsITCase.java       |   8 +-
 .../fit/console/RelationshipTypesITCase.java    |   6 +-
 .../syncope/fit/console/ReportsITCase.java      |  10 +-
 .../apache/syncope/fit/console/RolesITCase.java |  10 +-
 .../syncope/fit/console/SchemasITCase.java      |   6 +-
 .../fit/console/SecurityQuestionsITCase.java    |  12 +-
 .../syncope/fit/console/TopologyITCase.java     |  16 +-
 .../apache/syncope/fit/console/UsersITCase.java |  12 +-
 .../core/AbstractNotificationTaskITCase.java    |  11 +-
 .../syncope/fit/core/AbstractTaskITCase.java    |   6 +-
 .../syncope/fit/core/AnyObjectITCase.java       |  18 +-
 .../syncope/fit/core/AnyTypeClassITCase.java    |  18 +-
 .../apache/syncope/fit/core/AnyTypeITCase.java  |  20 +--
 .../syncope/fit/core/AuthenticationITCase.java  |  59 +++----
 .../syncope/fit/core/CamelRouteITCase.java      |  22 +--
 .../syncope/fit/core/ConfigurationITCase.java   |  18 +-
 .../syncope/fit/core/ConnectorITCase.java       |  47 ++---
 .../syncope/fit/core/DerSchemaITCase.java       |  20 +--
 .../apache/syncope/fit/core/DomainITCase.java   |  14 +-
 .../apache/syncope/fit/core/DynRealmITCase.java |  16 +-
 .../syncope/fit/core/ExceptionMapperITCase.java |  16 +-
 .../apache/syncope/fit/core/GroupITCase.java    |  42 ++---
 .../fit/core/IdentityRecertificationITCase.java |   9 +-
 .../org/apache/syncope/fit/core/JWTITCase.java  |  12 +-
 .../apache/syncope/fit/core/LoggerITCase.java   |  12 +-
 .../syncope/fit/core/MailTemplateITCase.java    |  26 +--
 .../syncope/fit/core/MembershipITCase.java      |  21 +--
 .../syncope/fit/core/MultitenancyITCase.java    |  18 +-
 .../syncope/fit/core/NotificationITCase.java    |  16 +-
 .../fit/core/NotificationTaskITCase.java        |  18 +-
 .../syncope/fit/core/PlainSchemaITCase.java     |  22 +--
 .../apache/syncope/fit/core/PolicyITCase.java   |  18 +-
 .../syncope/fit/core/PropagationTaskITCase.java |  10 +-
 .../apache/syncope/fit/core/PullTaskITCase.java |  42 ++---
 .../apache/syncope/fit/core/PushTaskITCase.java |  23 ++-
 .../org/apache/syncope/fit/core/RESTITCase.java |  18 +-
 .../apache/syncope/fit/core/RealmITCase.java    |  24 +--
 .../fit/core/RelationshipTypeITCase.java        |  14 +-
 .../apache/syncope/fit/core/ReportITCase.java   |  16 +-
 .../syncope/fit/core/ReportTemplateITCase.java  |  26 +--
 .../apache/syncope/fit/core/ResourceITCase.java |  77 ++++----
 .../org/apache/syncope/fit/core/RoleITCase.java |  16 +-
 .../apache/syncope/fit/core/SAML2ITCase.java    |  54 +++---
 .../syncope/fit/core/SchedTaskITCase.java       |  16 +-
 .../apache/syncope/fit/core/SearchITCase.java   |  12 +-
 .../fit/core/SecurityQuestionITCase.java        |  12 +-
 .../apache/syncope/fit/core/SwaggerITCase.java  |  12 +-
 .../org/apache/syncope/fit/core/UserITCase.java | 151 +++++++++-------
 .../syncope/fit/core/UserIssuesITCase.java      |  33 ++--
 .../apache/syncope/fit/core/UserSelfITCase.java |  47 +++--
 .../syncope/fit/core/UserWorkflowITCase.java    |  33 ++--
 .../apache/syncope/fit/core/VirAttrITCase.java  |  21 +--
 .../syncope/fit/core/VirSchemaITCase.java       |  22 +--
 .../apache/syncope/fit/core/WorkflowITCase.java |  20 +--
 .../src/test/resources/log4j2.xml               |  11 +-
 fit/enduser-reference/pom.xml                   |   4 +-
 .../ide/eclipse/tests/SyncopeViewTest.java      |   6 +-
 pom.xml                                         |  46 ++++-
 153 files changed, 1423 insertions(+), 1343 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/cli/pom.xml
----------------------------------------------------------------------
diff --git a/client/cli/pom.xml b/client/cli/pom.xml
index b6d185a..9b279f1 100644
--- a/client/cli/pom.xml
+++ b/client/cli/pom.xml
@@ -97,8 +97,8 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/cli/src/test/java/org/apache/syncope/client/cli/commands/MigrateTest.java
----------------------------------------------------------------------
diff --git a/client/cli/src/test/java/org/apache/syncope/client/cli/commands/MigrateTest.java b/client/cli/src/test/java/org/apache/syncope/client/cli/commands/MigrateTest.java
index e782744..f3239eb 100644
--- a/client/cli/src/test/java/org/apache/syncope/client/cli/commands/MigrateTest.java
+++ b/client/cli/src/test/java/org/apache/syncope/client/cli/commands/MigrateTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.syncope.client.cli.commands;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -33,8 +33,8 @@ import org.apache.commons.io.IOUtils;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.client.cli.commands.migrate.MigrateCommand;
 import org.apache.syncope.core.persistence.jpa.content.ContentLoaderHandler;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.jdbc.datasource.DriverManagerDataSource;
 import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
@@ -45,7 +45,7 @@ public class MigrateTest {
 
     private static String BASE_PATH;
 
-    @BeforeClass
+    @BeforeAll
     public static void before() {
         Properties props = new Properties();
         InputStream propStream = null;

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
----------------------------------------------------------------------
diff --git a/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java b/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
index b87f970..a1e4ee5 100644
--- a/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
+++ b/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
@@ -18,14 +18,14 @@
  */
 package org.apache.syncope.client.cli.util;
 
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
 import java.util.List;
 import org.apache.syncope.client.cli.Command;
 import org.apache.syncope.client.cli.commands.AbstractCommand;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class CommandUtilsTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/cli/src/test/java/org/apache/syncope/client/cli/util/JasyptUtilsTest.java
----------------------------------------------------------------------
diff --git a/client/cli/src/test/java/org/apache/syncope/client/cli/util/JasyptUtilsTest.java b/client/cli/src/test/java/org/apache/syncope/client/cli/util/JasyptUtilsTest.java
index 6962a2c..241dbda 100644
--- a/client/cli/src/test/java/org/apache/syncope/client/cli/util/JasyptUtilsTest.java
+++ b/client/cli/src/test/java/org/apache/syncope/client/cli/util/JasyptUtilsTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.client.cli.util;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class JasyptUtilsTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/enduser/pom.xml
----------------------------------------------------------------------
diff --git a/client/enduser/pom.xml b/client/enduser/pom.xml
index 52fe436..57cf120 100644
--- a/client/enduser/pom.xml
+++ b/client/enduser/pom.xml
@@ -185,8 +185,8 @@ under the License.
     
     <!-- TEST -->
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
     

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/enduser/src/test/java/org/apache/syncope/client/enduser/util/UserRequestValidatorTest.java
----------------------------------------------------------------------
diff --git a/client/enduser/src/test/java/org/apache/syncope/client/enduser/util/UserRequestValidatorTest.java b/client/enduser/src/test/java/org/apache/syncope/client/enduser/util/UserRequestValidatorTest.java
index 21c8218..84cef53 100644
--- a/client/enduser/src/test/java/org/apache/syncope/client/enduser/util/UserRequestValidatorTest.java
+++ b/client/enduser/src/test/java/org/apache/syncope/client/enduser/util/UserRequestValidatorTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.syncope.client.enduser.util;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -30,7 +30,7 @@ import java.util.Map;
 import org.apache.syncope.client.enduser.model.CustomAttributesInfo;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.core.io.ClassPathResource;
 
 public class UserRequestValidatorTest {

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/lib/pom.xml
----------------------------------------------------------------------
diff --git a/client/lib/pom.xml b/client/lib/pom.xml
index ce70fc4..1025ee8 100644
--- a/client/lib/pom.xml
+++ b/client/lib/pom.xml
@@ -83,9 +83,33 @@ under the License.
       <scope>test</scope>
     </dependency>        
     <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.seleniumhq.selenium</groupId>
+      <artifactId>selenium-java</artifactId>
+      <scope>test</scope>
+      <version>2.44.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.opera</groupId>
+      <artifactId>operadriver</artifactId>
+      <scope>test</scope>
+      <version>1.5</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.seleniumhq.selenium</groupId>
+          <artifactId>selenium-remote-driver</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>
+      <version>4.11</version>
     </dependency>
   </dependencies>
   

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/client/lib/src/test/java/org/apache/syncope/client/lib/ConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/client/lib/src/test/java/org/apache/syncope/client/lib/ConcurrencyTest.java b/client/lib/src/test/java/org/apache/syncope/client/lib/ConcurrencyTest.java
index 583109f..f993504 100644
--- a/client/lib/src/test/java/org/apache/syncope/client/lib/ConcurrencyTest.java
+++ b/client/lib/src/test/java/org/apache/syncope/client/lib/ConcurrencyTest.java
@@ -18,11 +18,11 @@
  */
 package org.apache.syncope.client.lib;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.common.rest.api.service.ResourceService;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/pom.xml
----------------------------------------------------------------------
diff --git a/common/lib/pom.xml b/common/lib/pom.xml
index 18cd8b8..f24f60a 100644
--- a/common/lib/pom.xml
+++ b/common/lib/pom.xml
@@ -77,8 +77,8 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/src/main/java/org/apache/syncope/common/lib/collections/IteratorChain.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/collections/IteratorChain.java b/common/lib/src/main/java/org/apache/syncope/common/lib/collections/IteratorChain.java
index c26de2a..a94f8b4 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/collections/IteratorChain.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/collections/IteratorChain.java
@@ -124,6 +124,7 @@ public class IteratorChain<E> implements Iterator<E> {
      * @param iteratorChain the array of iterators, not null
      * @throws NullPointerException if iterators array is or contains null
      */
+    @SafeVarargs
     public IteratorChain(final Iterator<? extends E>... iteratorChain) {
         super();
         for (final Iterator<? extends E> element : iteratorChain) {
@@ -145,9 +146,9 @@ public class IteratorChain<E> implements Iterator<E> {
      */
     public IteratorChain(final Collection<Iterator<? extends E>> iteratorChain) {
         super();
-        for (final Iterator<? extends E> iterator : iteratorChain) {
+        iteratorChain.forEach(iterator -> {
             addIterator(iterator);
-        }
+        });
     }
 
     //-----------------------------------------------------------------------
@@ -158,7 +159,7 @@ public class IteratorChain<E> implements Iterator<E> {
      * @throws IllegalStateException if I've already started iterating
      * @throws NullPointerException if the iterator is null
      */
-    public void addIterator(final Iterator<? extends E> iterator) {
+    private void addIterator(final Iterator<? extends E> iterator) {
         checkLocked();
         if (iterator == null) {
             throw new NullPointerException("Iterator must not be null");

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/src/test/java/org/apache/syncope/common/lib/AnyOperationsTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/AnyOperationsTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/AnyOperationsTest.java
index 51b6423..e04ecdd 100644
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/AnyOperationsTest.java
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/AnyOperationsTest.java
@@ -18,14 +18,14 @@
  */
 package org.apache.syncope.common.lib;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.apache.syncope.common.lib.patch.AnyObjectPatch;
 import org.apache.syncope.common.lib.patch.AttrPatch;
 import org.apache.syncope.common.lib.to.AnyObjectTO;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.types.PatchOperation;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AnyOperationsTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
index 529e604..70d1479 100644
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/JAXBTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.syncope.common.lib;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.StringReader;
 import java.io.StringWriter;
@@ -38,7 +38,7 @@ import org.apache.syncope.common.lib.to.GroupTO;
 import org.apache.syncope.common.lib.to.PropagationStatus;
 import org.apache.syncope.common.lib.to.ProvisioningResult;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class JAXBTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
index 9c5c777..7c50063 100644
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/JSONTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.syncope.common.lib;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -39,7 +39,7 @@ import org.apache.syncope.common.lib.to.ProvisioningResult;
 import org.apache.syncope.common.lib.to.ReportTO;
 import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
 import org.apache.syncope.common.lib.types.PatchOperation;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class JSONTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/common/lib/src/test/java/org/apache/syncope/common/lib/search/SyncopeFiqlParserTest.java
----------------------------------------------------------------------
diff --git a/common/lib/src/test/java/org/apache/syncope/common/lib/search/SyncopeFiqlParserTest.java b/common/lib/src/test/java/org/apache/syncope/common/lib/search/SyncopeFiqlParserTest.java
index 8414c41..168b0af 100644
--- a/common/lib/src/test/java/org/apache/syncope/common/lib/search/SyncopeFiqlParserTest.java
+++ b/common/lib/src/test/java/org/apache/syncope/common/lib/search/SyncopeFiqlParserTest.java
@@ -18,14 +18,14 @@
  */
 package org.apache.syncope.common.lib.search;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.apache.cxf.jaxrs.ext.search.ConditionType;
 import org.apache.cxf.jaxrs.ext.search.SearchBean;
 import org.apache.cxf.jaxrs.ext.search.SearchCondition;
 import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class SyncopeFiqlParserTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-api/pom.xml
----------------------------------------------------------------------
diff --git a/core/persistence-api/pom.xml b/core/persistence-api/pom.xml
index fa14bbe..c0ddcde 100644
--- a/core/persistence-api/pom.xml
+++ b/core/persistence-api/pom.xml
@@ -70,8 +70,8 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-api/src/test/java/org/apache/syncope/core/persistence/api/search/SearchCondConverterTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-api/src/test/java/org/apache/syncope/core/persistence/api/search/SearchCondConverterTest.java b/core/persistence-api/src/test/java/org/apache/syncope/core/persistence/api/search/SearchCondConverterTest.java
index 01fb922..6d5981e 100644
--- a/core/persistence-api/src/test/java/org/apache/syncope/core/persistence/api/search/SearchCondConverterTest.java
+++ b/core/persistence-api/src/test/java/org/apache/syncope/core/persistence/api/search/SearchCondConverterTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.syncope.core.persistence.api.search;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.UUID;
 import org.apache.syncope.common.lib.search.AnyObjectFiqlSearchConditionBuilder;
@@ -37,7 +37,7 @@ import org.apache.syncope.core.persistence.api.dao.search.DynRealmCond;
 import org.apache.syncope.core.persistence.api.dao.search.MemberCond;
 import org.apache.syncope.core.persistence.api.dao.search.RelationshipCond;
 import org.apache.syncope.core.persistence.api.dao.search.RelationshipTypeCond;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class SearchCondConverterTest {
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/pom.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/pom.xml b/core/persistence-jpa/pom.xml
index b99e77c..da3270d 100644
--- a/core/persistence-jpa/pom.xml
+++ b/core/persistence-jpa/pom.xml
@@ -132,8 +132,8 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
index f59ac32..d0151ba 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
@@ -23,14 +23,11 @@ import org.apache.syncope.core.spring.security.AuthContextUtils;
 import org.apache.syncope.core.spring.ApplicationContextProvider;
 import org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory;
 import org.apache.syncope.core.persistence.api.entity.EntityFactory;
-import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.orm.jpa.EntityManagerFactoryUtils;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
 
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath:persistenceTest.xml" })
+@SpringJUnitConfig(locations = { "classpath:persistenceTest.xml" })
 public abstract class AbstractTest {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyObjectTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyObjectTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyObjectTest.java
index 18172c5..c0d71a7 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyObjectTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyObjectTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
@@ -28,7 +28,7 @@ import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
 import org.apache.syncope.core.persistence.api.dao.RealmDAO;
 import org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java
index a6bcf52..480b959 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnySearchTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -55,7 +55,7 @@ import org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
 import org.apache.syncope.core.persistence.api.entity.group.Group;
 import org.apache.syncope.core.persistence.api.entity.user.User;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeClassTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeClassTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeClassTest.java
index 1bdae2d..0c7eacf 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeClassTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeClassTest.java
@@ -18,17 +18,17 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.List;
 import org.apache.syncope.core.persistence.api.dao.AnyTypeClassDAO;
 import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
 import org.apache.syncope.core.persistence.api.entity.AnyTypeClass;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeTest.java
index 05026a2..1db62d8 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/AnyTypeTest.java
@@ -18,10 +18,11 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.List;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -30,7 +31,7 @@ import org.apache.syncope.core.persistence.api.dao.AnyTypeClassDAO;
 import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
 import org.apache.syncope.core.persistence.api.entity.AnyType;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -82,20 +83,24 @@ public class AnyTypeTest extends AbstractTest {
         assertFalse(newType.getClasses().isEmpty());
     }
 
-    @Test(expected = InvalidEntityException.class)
+    @Test
     public void saveInvalidKind() {
-        AnyType newType = entityFactory.newEntity(AnyType.class);
-        newType.setKey("new type");
-        newType.setKind(AnyTypeKind.USER);
-        anyTypeDAO.save(newType);
+        assertThrows(InvalidEntityException.class, () -> {
+            AnyType newType = entityFactory.newEntity(AnyType.class);
+            newType.setKey("new type");
+            newType.setKind(AnyTypeKind.USER);
+            anyTypeDAO.save(newType);
+        });
     }
 
-    @Test(expected = InvalidEntityException.class)
+    @Test
     public void saveInvalidName() {
-        AnyType newType = entityFactory.newEntity(AnyType.class);
-        newType.setKey("group");
-        newType.setKind(AnyTypeKind.ANY_OBJECT);
-        anyTypeDAO.save(newType);
+        assertThrows(InvalidEntityException.class, () -> {
+            AnyType newType = entityFactory.newEntity(AnyType.class);
+            newType.setKey("group");
+            newType.setKind(AnyTypeKind.ANY_OBJECT);
+            anyTypeDAO.save(newType);
+        });
     }
 
     @Test
@@ -107,8 +112,10 @@ public class AnyTypeTest extends AbstractTest {
         assertNull(anyTypeDAO.find("PRINTER"));
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void deleteInvalid() {
-        anyTypeDAO.delete(anyTypeDAO.findUser().getKey());
+        assertThrows(IllegalArgumentException.class, () -> {
+            anyTypeDAO.delete(anyTypeDAO.findUser().getKey());
+        });
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java
index d72ea14..87c4f3f 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConfTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.Optional;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
@@ -34,7 +34,7 @@ import org.apache.syncope.core.persistence.api.entity.PlainSchema;
 import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
 import org.apache.syncope.core.persistence.jpa.entity.conf.JPACPlainAttrValue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -112,7 +112,7 @@ public class ConfTest extends AbstractTest {
             failing.setType(AttrSchemaType.String);
             plainSchemaDAO.save(failing);
 
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             assertTrue(e.hasViolation(EntityViolationType.InvalidKey));
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConnInstanceTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConnInstanceTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConnInstanceTest.java
index fd47175..1d9784b 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConnInstanceTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ConnInstanceTest.java
@@ -18,12 +18,12 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.File;
 import java.util.HashSet;
@@ -40,7 +40,7 @@ import org.apache.syncope.core.persistence.jpa.AbstractTest;
 import org.apache.syncope.core.spring.security.DelegatedAdministrationException;
 import org.apache.syncope.core.spring.security.SyncopeAuthenticationDetails;
 import org.apache.syncope.core.spring.security.SyncopeGrantedAuthority;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
@@ -78,13 +78,12 @@ public class ConnInstanceTest extends AbstractTest {
     public void findById() {
         ConnInstance connInstance = connInstanceDAO.find("88a7a819-dab5-46b4-9b90-0b9769eabdb8");
         assertNotNull(connInstance);
-        assertEquals("invalid connector name",
-                "net.tirasa.connid.bundles.soap.WebServiceConnector", connInstance.getConnectorName());
-        assertEquals("invalid bundle name", "net.tirasa.connid.bundles.soap", connInstance.getBundleName());
+        assertEquals("net.tirasa.connid.bundles.soap.WebServiceConnector", connInstance.getConnectorName());
+        assertEquals("net.tirasa.connid.bundles.soap", connInstance.getBundleName());
 
         try {
             connInstanceDAO.authFind("88a7a819-dab5-46b4-9b90-0b9769eabdb8");
-            fail();
+            fail("This should not happen");
         } catch (DelegatedAdministrationException e) {
             assertNotNull(e);
         }
@@ -140,32 +139,31 @@ public class ConnInstanceTest extends AbstractTest {
 
         assertNotNull("save did not work", actual.getKey());
 
-        assertEquals("save did not work for \"name\" attribute", "WebService", actual.getConnectorName());
+        assertEquals("WebService", actual.getConnectorName());
 
-        assertEquals("save did not work for \"bundle name\" attribute", "org.apache.syncope.core.persistence.test.util",
-                actual.getBundleName());
+        assertEquals("org.apache.syncope.core.persistence.test.util", actual.getBundleName());
 
-        assertEquals("save did not work for \"majorVersion\" attribute", "1.0", connInstance.getVersion());
+        assertEquals("1.0", connInstance.getVersion());
 
         assertEquals("New", actual.getDisplayName());
 
-        assertEquals(60, actual.getConnRequestTimeout(), 0);
+        assertEquals(60, actual.getConnRequestTimeout().intValue());
 
         conf = connInstance.getConf();
         assertFalse(conf.isEmpty());
 
-        assertNotNull("configuration retrieving failed", conf);
+        assertNotNull(conf);
         assertTrue(conf.size() == 2);
     }
 
     @Test
     public void delete() {
         ConnInstance connectorInstance = connInstanceDAO.find("88a7a819-dab5-46b4-9b90-0b9769eabdb8");
-        assertNotNull("find to delete did not work", connectorInstance);
+        assertNotNull(connectorInstance);
 
         connInstanceDAO.delete(connectorInstance.getKey());
 
         ConnInstance actual = connInstanceDAO.find("88a7a819-dab5-46b4-9b90-0b9769eabdb8");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java
index 97764b8..55d2498 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DerSchemaTest.java
@@ -18,11 +18,11 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.List;
 import org.apache.syncope.common.lib.types.EntityViolationType;
@@ -30,7 +30,7 @@ import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntit
 import org.apache.syncope.core.persistence.api.dao.DerSchemaDAO;
 import org.apache.syncope.core.persistence.api.entity.DerSchema;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -49,7 +49,7 @@ public class DerSchemaTest extends AbstractTest {
     @Test
     public void findByName() {
         DerSchema attributeSchema = derSchemaDAO.find("cn");
-        assertNotNull("did not find expected derived attribute schema", attributeSchema);
+        assertNotNull(attributeSchema);
     }
 
     @Test
@@ -61,7 +61,7 @@ public class DerSchemaTest extends AbstractTest {
         derSchemaDAO.save(derivedAttributeSchema);
 
         DerSchema actual = derSchemaDAO.find("cn2");
-        assertNotNull("expected save to work", actual);
+        assertNotNull(actual);
         assertEquals(derivedAttributeSchema, actual);
     }
 
@@ -73,7 +73,7 @@ public class DerSchemaTest extends AbstractTest {
         derSchemaDAO.delete(cn.getKey());
 
         DerSchema actual = derSchemaDAO.find("cn");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
 
         // ------------- //
         DerSchema rderiveddata = derSchemaDAO.find("rderiveddata");
@@ -82,7 +82,7 @@ public class DerSchemaTest extends AbstractTest {
         derSchemaDAO.delete(rderiveddata.getKey());
 
         actual = derSchemaDAO.find("rderiveddata");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
     }
 
     @Test
@@ -92,7 +92,7 @@ public class DerSchemaTest extends AbstractTest {
 
         try {
             derSchemaDAO.save(schema);
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             assertTrue(e.hasViolation(EntityViolationType.InvalidKey));
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
index 0a0a73e..468c8e5 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/DomainTest.java
@@ -18,18 +18,18 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import org.apache.syncope.common.lib.types.CipherAlgorithm;
 import org.apache.syncope.core.persistence.api.dao.DomainDAO;
 import org.apache.syncope.core.persistence.api.entity.Domain;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
index 6a4057b..52766e5 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/GroupTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import org.apache.syncope.common.lib.SyncopeConstants;
@@ -29,7 +29,7 @@ import org.apache.syncope.core.persistence.api.dao.GroupDAO;
 import org.apache.syncope.core.persistence.api.dao.RealmDAO;
 import org.apache.syncope.core.persistence.api.entity.group.Group;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -48,13 +48,13 @@ public class GroupTest extends AbstractTest {
     @Test
     public void findAll() {
         List<Group> list = groupDAO.findAll(1, 100);
-        assertEquals("did not get expected number of groups ", 16, list.size());
+        assertEquals(16, list.size());
     }
 
     @Test
     public void find() {
         Group group = groupDAO.findByName("root");
-        assertNotNull("did not find expected group", group);
+        assertNotNull(group);
 
         group = groupDAO.findByName("additional");
         assertNotNull(group);
@@ -71,7 +71,7 @@ public class GroupTest extends AbstractTest {
         group = groupDAO.save(group);
 
         Group actual = groupDAO.find(group.getKey());
-        assertNotNull("expected save to work", actual);
+        assertNotNull(actual);
     }
 
     @Test
@@ -80,6 +80,6 @@ public class GroupTest extends AbstractTest {
         groupDAO.delete(group.getKey());
 
         Group actual = groupDAO.find("8fb2d51e-c605-4e80-a72b-13ffecf1aa9a");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MailTemplateTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MailTemplateTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MailTemplateTest.java
index 772f4c1..efb513e 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MailTemplateTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MailTemplateTest.java
@@ -18,15 +18,15 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import org.apache.syncope.core.persistence.api.dao.MailTemplateDAO;
 import org.apache.syncope.core.persistence.api.entity.MailTemplate;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
index 5ca623c..caabb79 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/MultitenancyTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.List;
 import java.util.stream.Collectors;
@@ -35,9 +35,9 @@ import org.apache.syncope.core.persistence.api.dao.RealmDAO;
 import org.apache.syncope.core.persistence.api.dao.UserDAO;
 import org.apache.syncope.core.persistence.api.entity.user.User;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
@@ -56,7 +56,7 @@ public class MultitenancyTest extends AbstractTest {
     @Autowired
     private UserDAO userDAO;
 
-    @BeforeClass
+    @BeforeAll
     public static void setAuthContext() {
         List<GrantedAuthority> authorities = StandardEntitlement.values().stream().
                 map(entitlement -> new SyncopeGrantedAuthority(entitlement, SyncopeConstants.ROOT_REALM)).
@@ -69,7 +69,7 @@ public class MultitenancyTest extends AbstractTest {
         SecurityContextHolder.getContext().setAuthentication(auth);
     }
 
-    @AfterClass
+    @AfterAll
     public static void unsetAuthContext() {
         SecurityContextHolder.getContext().setAuthentication(null);
     }
@@ -96,7 +96,7 @@ public class MultitenancyTest extends AbstractTest {
         user.setUsername("username");
 
         User actual = userDAO.save(user);
-        assertNotNull("expected save to work", actual);
+        assertNotNull(actual);
         assertEquals(0, actual.getPasswordHistory().size());
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
index b2ef43c..953cb9d 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/NotificationTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
@@ -29,7 +29,7 @@ import org.apache.syncope.core.persistence.api.dao.NotificationDAO;
 import org.apache.syncope.core.persistence.api.entity.AnyAbout;
 import org.apache.syncope.core.persistence.api.entity.Notification;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
index 0844c7a..cc9281e 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainAttrTest.java
@@ -18,11 +18,11 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
@@ -41,7 +41,7 @@ import org.apache.syncope.core.persistence.api.entity.user.User;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
 import org.apache.syncope.core.spring.security.Encryptor;
 import org.apache.syncope.core.persistence.api.entity.PlainSchema;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -60,9 +60,9 @@ public class PlainAttrTest extends AbstractTest {
     @Test
     public void findByKey() {
         UPlainAttr attribute = plainAttrDAO.find("01f22fbd-b672-40af-b528-686d9b27ebc4", UPlainAttr.class);
-        assertNotNull("did not find expected attribute", attribute);
+        assertNotNull(attribute);
         attribute = plainAttrDAO.find("9d0d9e40-1b18-488e-9482-37dab82163c9", UPlainAttr.class);
-        assertNotNull("did not find expected attribute", attribute);
+        assertNotNull(attribute);
     }
 
     @Test
@@ -91,14 +91,14 @@ public class PlainAttrTest extends AbstractTest {
         } catch (ValidationException e) {
             thrown = e;
         }
-        assertNull("no validation exception expected here ", thrown);
+        assertNull(thrown);
 
         try {
             attr.add("http://www.apache.org", anyUtilsFactory.getInstance(AnyTypeKind.USER));
         } catch (ValidationException e) {
             thrown = e;
         }
-        assertNotNull("validation exception expected here ", thrown);
+        assertNotNull(thrown);
     }
 
     @Test
@@ -122,7 +122,7 @@ public class PlainAttrTest extends AbstractTest {
         } catch (ValidationException e) {
             thrown = e;
         }
-        assertNotNull("validation exception expected here ", thrown);
+        assertNotNull(thrown);
 
         attribute.add("M", anyUtilsFactory.getInstance(AnyTypeKind.USER));
 
@@ -161,7 +161,7 @@ public class PlainAttrTest extends AbstractTest {
         InvalidEntityException iee = null;
         try {
             userDAO.save(user);
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             iee = e;
         }
@@ -231,6 +231,6 @@ public class PlainAttrTest extends AbstractTest {
         plainAttrDAO.delete(attribute.getKey(), UPlainAttr.class);
 
         PlainSchema schema = plainSchemaDAO.find(attrSchemaName);
-        assertNotNull("user attribute schema deleted when deleting values", schema);
+        assertNotNull(schema);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
index ffe1edc..a1f8141 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java
@@ -18,12 +18,13 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.List;
 import org.apache.syncope.common.lib.SyncopeConstants;
@@ -34,7 +35,7 @@ import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
 import org.apache.syncope.core.persistence.api.entity.PlainSchema;
 import org.apache.syncope.core.persistence.api.entity.group.GPlainAttr;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -53,7 +54,7 @@ public class PlainSchemaTest extends AbstractTest {
     @Test
     public void findByName() {
         PlainSchema schema = plainSchemaDAO.find("fullname");
-        assertNotNull("did not find expected attribute schema", schema);
+        assertNotNull(schema);
     }
 
     @Test
@@ -78,21 +79,23 @@ public class PlainSchemaTest extends AbstractTest {
         plainSchemaDAO.save(schema);
 
         PlainSchema actual = plainSchemaDAO.find("secondaryEmail");
-        assertNotNull("expected save to work", actual);
+        assertNotNull(actual);
         assertEquals(schema, actual);
     }
 
-    @Test(expected = InvalidEntityException.class)
+    @Test
     public void saveNonValid() {
-        PlainSchema schema = entityFactory.newEntity(PlainSchema.class);
-        schema.setKey("secondaryEmail");
-        schema.setType(AttrSchemaType.String);
-        schema.setValidatorClass("org.apache.syncope.core.validation.EmailAddressValidator");
-        schema.setMandatoryCondition("false");
-        schema.setMultivalue(true);
-        schema.setUniqueConstraint(true);
+        assertThrows(InvalidEntityException.class, () -> {
+            PlainSchema schema = entityFactory.newEntity(PlainSchema.class);
+            schema.setKey("secondaryEmail");
+            schema.setType(AttrSchemaType.String);
+            schema.setValidatorClass("org.apache.syncope.core.validation.EmailAddressValidator");
+            schema.setMandatoryCondition("false");
+            schema.setMultivalue(true);
+            schema.setUniqueConstraint(true);
 
-        plainSchemaDAO.save(schema);
+            plainSchemaDAO.save(schema);
+        });
     }
 
     @Test
@@ -103,7 +106,7 @@ public class PlainSchemaTest extends AbstractTest {
 
         try {
             plainSchemaDAO.save(schema);
-            fail();
+            fail("This should not happen");
         } catch (Exception e) {
             assertNotNull(e);
         }
@@ -119,11 +122,13 @@ public class PlainSchemaTest extends AbstractTest {
         assertFalse(actual.getEnumerationKeys().isEmpty());
     }
 
-    @Test(expected = InvalidEntityException.class)
+    @Test
     public void saveInvalidSchema() {
-        PlainSchema schema = entityFactory.newEntity(PlainSchema.class);
-        schema.setKey("username");
-        plainSchemaDAO.save(schema);
+        assertThrows(InvalidEntityException.class, () -> {
+            PlainSchema schema = entityFactory.newEntity(PlainSchema.class);
+            schema.setKey("username");
+            plainSchemaDAO.save(schema);
+        });
     }
 
     @Test
@@ -133,7 +138,7 @@ public class PlainSchemaTest extends AbstractTest {
         plainSchemaDAO.delete(firstname.getKey());
 
         PlainSchema actual = plainSchemaDAO.find("firstname");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
     }
 
     @Test
@@ -143,7 +148,7 @@ public class PlainSchemaTest extends AbstractTest {
 
         try {
             plainSchemaDAO.save(schema);
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             assertTrue(e.hasViolation(EntityViolationType.InvalidKey));
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
index 1086d3e..3f7948d 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PolicyTest.java
@@ -18,11 +18,11 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.List;
 import org.apache.commons.lang3.ArrayUtils;
@@ -35,7 +35,7 @@ import org.apache.syncope.core.persistence.api.dao.PolicyDAO;
 import org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy;
 import org.apache.syncope.core.persistence.api.entity.Policy;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.apache.syncope.core.persistence.api.entity.policy.PullPolicy;
@@ -59,7 +59,7 @@ public class PolicyTest extends AbstractTest {
     @Test
     public void findByKey() {
         PullPolicy policy = policyDAO.find("880f8553-069b-4aed-9930-2cd53873f544");
-        assertNotNull("findById did not work", policy);
+        assertNotNull(policy);
 
         PullPolicySpec spec = policy.getSpecification();
         assertNotNull(spec);
@@ -76,7 +76,7 @@ public class PolicyTest extends AbstractTest {
     @Test
     public void findByType() {
         List<PullPolicy> policies = policyDAO.find(PullPolicy.class);
-        assertNotNull("findById did not work", policies);
+        assertNotNull(policies);
         assertFalse(policies.isEmpty());
     }
 
@@ -125,11 +125,11 @@ public class PolicyTest extends AbstractTest {
     @Test
     public void delete() {
         Policy policy = policyDAO.find("66691e96-285f-4464-bc19-e68384ea4c85");
-        assertNotNull("find to delete did not work", policy);
+        assertNotNull(policy);
 
         policyDAO.delete(policy);
 
         Policy actual = policyDAO.find("66691e96-285f-4464-bc19-e68384ea4c85");
-        assertNull("delete did not work", actual);
+        assertNull(actual);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
index 2e8d215..936e822 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RealmTest.java
@@ -18,12 +18,13 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.List;
 import org.apache.syncope.common.lib.SyncopeConstants;
@@ -36,7 +37,7 @@ import org.apache.syncope.core.persistence.api.entity.policy.AccountPolicy;
 import org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy;
 import org.apache.syncope.core.persistence.api.entity.Realm;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -75,9 +76,11 @@ public class RealmTest extends AbstractTest {
         assertEquals("/even/two", realm.getFullPath());
     }
 
-    @Test(expected = MalformedPathException.class)
+    @Test
     public void findInvalidPath() {
-        realmDAO.findByFullPath("even/two");
+        assertThrows(MalformedPathException.class, () -> {
+            realmDAO.findByFullPath("even/two");
+        });
     }
 
     @Test
@@ -96,9 +99,9 @@ public class RealmTest extends AbstractTest {
         List<Realm> list = realmDAO.findAll();
         assertNotNull(list);
         assertFalse(list.isEmpty());
-        for (Realm realm : list) {
+        list.forEach(realm -> {
             assertNotNull(realm);
-        }
+        });
     }
 
     @Test
@@ -135,7 +138,7 @@ public class RealmTest extends AbstractTest {
 
         try {
             realmDAO.save(realm);
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             assertTrue(e.hasViolation(EntityViolationType.InvalidRealm));
         }
@@ -149,7 +152,7 @@ public class RealmTest extends AbstractTest {
 
         try {
             realmDAO.save(realm);
-            fail();
+            fail("This should not happen");
         } catch (InvalidEntityException e) {
             assertTrue(e.hasViolation(EntityViolationType.InvalidRealm));
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
index 3a54a17..dce3e09 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RelationshipTypeTest.java
@@ -18,21 +18,21 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.List;
-import java.util.UUID;
 import org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException;
 import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
 import org.apache.syncope.core.persistence.api.dao.RelationshipTypeDAO;
 import org.apache.syncope.core.persistence.api.entity.RelationshipType;
 import org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -69,11 +69,13 @@ public class RelationshipTypeTest extends AbstractTest {
         assertEquals("description", newType.getDescription());
     }
 
-    @Test(expected = InvalidEntityException.class)
+    @Test
     public void saveInvalidName() {
-        RelationshipType newType = entityFactory.newEntity(RelationshipType.class);
-        newType.setKey("membership");
-        relationshipTypeDAO.save(newType);
+        assertThrows(InvalidEntityException.class, () -> {
+            RelationshipType newType = entityFactory.newEntity(RelationshipType.class);
+            newType.setKey("membership");
+            relationshipTypeDAO.save(newType);
+        });
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTemplateTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTemplateTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTemplateTest.java
index ac0fde9..e1e2574 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTemplateTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTemplateTest.java
@@ -18,15 +18,15 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import org.apache.syncope.core.persistence.api.dao.ReportTemplateDAO;
 import org.apache.syncope.core.persistence.api.entity.ReportTemplate;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/45ad6f55/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
index e34b8b3..2bee358 100644
--- a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
+++ b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/ReportTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.core.persistence.jpa.inner;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.List;
 import java.util.UUID;
@@ -29,7 +29,7 @@ import org.apache.syncope.core.persistence.api.dao.ReportDAO;
 import org.apache.syncope.core.persistence.api.dao.ReportTemplateDAO;
 import org.apache.syncope.core.persistence.api.entity.Report;
 import org.apache.syncope.core.persistence.jpa.AbstractTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 


Mime
View raw message