Browse Source

junit5 upgrade

Jason Rivard 2 years ago
parent
commit
67868be728
81 changed files with 1351 additions and 1273 deletions
  1. 10 10
      lib-data/src/test/java/password/pwm/bean/VersionNumberTest.java
  2. 31 3
      lib-util/src/main/java/password/pwm/util/java/CollectionUtil.java
  3. 28 1
      lib-util/src/main/java/password/pwm/util/java/CollectorUtil.java
  4. 5 5
      lib-util/src/test/java/password/pwm/util/java/AtomicLoopIntIncrementerTest.java
  5. 5 5
      lib-util/src/test/java/password/pwm/util/java/AverageTrackerTest.java
  6. 37 14
      lib-util/src/test/java/password/pwm/util/java/CollectorUtilTest.java
  7. 35 35
      lib-util/src/test/java/password/pwm/util/java/CopyingInputStreamTest.java
  8. 4 4
      lib-util/src/test/java/password/pwm/util/java/JavaHelperTest.java
  9. 11 8
      lib-util/src/test/java/password/pwm/util/java/LazySupplierTest.java
  10. 21 21
      lib-util/src/test/java/password/pwm/util/java/StringUtilTest.java
  11. 12 6
      pom.xml
  12. 6 0
      server/pom.xml
  13. 5 6
      server/src/main/java/password/pwm/config/PwmSettingCategory.java
  14. 1 1
      server/src/main/java/password/pwm/health/LocalDBHealthChecker.java
  15. 8 0
      server/src/main/java/password/pwm/util/java/FileSystemUtility.java
  16. 6 6
      server/src/test/java/password/pwm/AppPropertyTest.java
  17. 18 18
      server/src/test/java/password/pwm/PwmDomainUtilTest.java
  18. 5 5
      server/src/test/java/password/pwm/bean/DomainIDTest.java
  19. 4 4
      server/src/test/java/password/pwm/bean/ProfileIDTest.java
  20. 15 12
      server/src/test/java/password/pwm/config/DomainConfigTest.java
  21. 6 6
      server/src/test/java/password/pwm/config/PwmSettingCategoryTest.java
  22. 12 11
      server/src/test/java/password/pwm/config/PwmSettingPropertyTest.java
  23. 3 3
      server/src/test/java/password/pwm/config/PwmSettingTemplateTest.java
  24. 13 18
      server/src/test/java/password/pwm/config/PwmSettingTest.java
  25. 15 15
      server/src/test/java/password/pwm/config/PwmSettingXmlTest.java
  26. 6 6
      server/src/test/java/password/pwm/config/StoredValueEncoderTest.java
  27. 1 1
      server/src/test/java/password/pwm/config/option/IdentityVerificationMethodEnumTest.java
  28. 15 12
      server/src/test/java/password/pwm/config/profile/PasswordRuleReaderHelperTest.java
  29. 8 8
      server/src/test/java/password/pwm/config/profile/ProfileUtilityTest.java
  30. 1 1
      server/src/test/java/password/pwm/config/profile/PwmPasswordRuleTest.java
  31. 14 14
      server/src/test/java/password/pwm/config/stored/ConfigurationCleanerTest.java
  32. 9 9
      server/src/test/java/password/pwm/config/stored/StoredConfigKeyTest.java
  33. 7 7
      server/src/test/java/password/pwm/config/stored/StoredConfigurationModifierTest.java
  34. 14 8
      server/src/test/java/password/pwm/config/stored/StoredConfigurationTest.java
  35. 7 7
      server/src/test/java/password/pwm/config/stored/StoredConfigurationUtilTest.java
  36. 37 37
      server/src/test/java/password/pwm/config/value/ActionValueTest.java
  37. 7 7
      server/src/test/java/password/pwm/config/value/FileValueTest.java
  38. 1 1
      server/src/test/java/password/pwm/error/PwmErrorTest.java
  39. 3 3
      server/src/test/java/password/pwm/health/HealthMessageTest.java
  40. 4 4
      server/src/test/java/password/pwm/health/HealthStatusTest.java
  41. 3 3
      server/src/test/java/password/pwm/http/HttpContentTypeTest.java
  42. 14 14
      server/src/test/java/password/pwm/http/PwmURLTest.java
  43. 4 4
      server/src/test/java/password/pwm/http/ServletTest.java
  44. 47 52
      server/src/test/java/password/pwm/http/client/PwmHttpClientTest.java
  45. 10 10
      server/src/test/java/password/pwm/http/filter/RequestInitializationFilterTest.java
  46. 10 10
      server/src/test/java/password/pwm/http/servlet/ControlledPwmServletTest.java
  47. 6 6
      server/src/test/java/password/pwm/http/servlet/oauth/OAuthMachineTest.java
  48. 9 10
      server/src/test/java/password/pwm/i18n/AdminPropertyKeysTest.java
  49. 4 4
      server/src/test/java/password/pwm/i18n/NonLocalizedKeyTest.java
  50. 20 17
      server/src/test/java/password/pwm/svc/email/InternetAddressTest.java
  51. 4 4
      server/src/test/java/password/pwm/svc/event/AuditEventTest.java
  52. 10 10
      server/src/test/java/password/pwm/svc/event/CEFAuditFormatterTest.java
  53. 9 8
      server/src/test/java/password/pwm/svc/event/JsonAuditFormatterTest.java
  54. 20 20
      server/src/test/java/password/pwm/svc/event/LdapXmlUserHistoryTest.java
  55. 13 13
      server/src/test/java/password/pwm/svc/sms/EmailQueueManagerTest.java
  56. 13 13
      server/src/test/java/password/pwm/svc/wordlist/WordTypeTest.java
  57. 71 68
      server/src/test/java/password/pwm/svc/wordlist/WordlistServiceTest.java
  58. 4 4
      server/src/test/java/password/pwm/svc/wordlist/WordlistUtilTest.java
  59. 4 4
      server/src/test/java/password/pwm/tests/PwmPasswordJudgeTest.java
  60. 3 3
      server/src/test/java/password/pwm/util/LDAPPermissionCalculatorTest.java
  61. 10 10
      server/src/test/java/password/pwm/util/i18n/LocaleComparatorTest.java
  62. 4 4
      server/src/test/java/password/pwm/util/java/PwmDateFormatTest.java
  63. 28 28
      server/src/test/java/password/pwm/util/java/TimeDurationTest.java
  64. 1 1
      server/src/test/java/password/pwm/util/java/XmlFactoryBenchmarkExtendedTest.java
  65. 6 6
      server/src/test/java/password/pwm/util/java/XmlFactoryTest.java
  66. 90 86
      server/src/test/java/password/pwm/util/json/JsonProviderTest.java
  67. 93 27
      server/src/test/java/password/pwm/util/localdb/LocalDBBasicTest.java
  68. 0 80
      server/src/test/java/password/pwm/util/localdb/LocalDBExtendedTest.java
  69. 10 9
      server/src/test/java/password/pwm/util/localdb/LocalDBLoggerExtendedTest.java
  70. 75 74
      server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueueExtendedTest.java
  71. 19 19
      server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueuePositionTest.java
  72. 108 96
      server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueueTest.java
  73. 53 58
      server/src/test/java/password/pwm/util/macro/MacroTest.java
  74. 11 11
      server/src/test/java/password/pwm/util/otp/OTPPamUtilTest.java
  75. 14 40
      server/src/test/java/password/pwm/util/otp/OTPUrlUtilTest.java
  76. 10 14
      server/src/test/java/password/pwm/util/password/PasswordRuleChecksTest.java
  77. 70 70
      server/src/test/java/password/pwm/util/password/PwmPasswordRuleValidatorTest.java
  78. 8 8
      server/src/test/java/password/pwm/util/password/RandomPasswordGeneratorTest.java
  79. 1 1
      server/src/test/java/password/pwm/util/secure/PromiscuousTrustManagerTest.java
  80. 3 3
      server/src/test/java/password/pwm/util/secure/self/SelfCertAppItemGeneratorTest.java
  81. 9 9
      server/src/test/java/password/pwm/ws/server/rest/RestServletTest.java

+ 10 - 10
lib-data/src/test/java/password/pwm/bean/VersionNumberTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.bean;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -34,12 +34,12 @@ public class VersionNumberTest
     {
         {
             final VersionNumber versionNumber = VersionNumber.parse( "v1.2.3" );
-            Assert.assertEquals( VersionNumber.of( 1, 2, 3 ), versionNumber );
+            Assertions.assertEquals( VersionNumber.of( 1, 2, 3 ), versionNumber );
         }
 
         {
             final VersionNumber versionNumber = VersionNumber.parse( "v1.2" );
-            Assert.assertEquals( VersionNumber.of( 1, 2, 0 ), versionNumber );
+            Assertions.assertEquals( VersionNumber.of( 1, 2, 0 ), versionNumber );
         }
     }
 
@@ -57,11 +57,11 @@ public class VersionNumberTest
 
         Collections.sort( list );
 
-        Assert.assertEquals( VersionNumber.of( 1, 3, 3 ), list.get( 0 ) );
-        Assert.assertEquals( VersionNumber.of( 1, 3, 5 ), list.get( 1 ) );
-        Assert.assertEquals( VersionNumber.of( 1, 4, 5 ), list.get( 2 ) );
-        Assert.assertEquals( VersionNumber.of( 3, 2, 3 ), list.get( 3 ) );
-        Assert.assertEquals( VersionNumber.of( 7, 0, 11 ), list.get( 4 ) );
-        Assert.assertEquals( VersionNumber.of( 42, 2, 1 ), list.get( 5 ) );
+        Assertions.assertEquals( VersionNumber.of( 1, 3, 3 ), list.get( 0 ) );
+        Assertions.assertEquals( VersionNumber.of( 1, 3, 5 ), list.get( 1 ) );
+        Assertions.assertEquals( VersionNumber.of( 1, 4, 5 ), list.get( 2 ) );
+        Assertions.assertEquals( VersionNumber.of( 3, 2, 3 ), list.get( 3 ) );
+        Assertions.assertEquals( VersionNumber.of( 7, 0, 11 ), list.get( 4 ) );
+        Assertions.assertEquals( VersionNumber.of( 42, 2, 1 ), list.get( 5 ) );
     }
 }

+ 31 - 3
lib-util/src/main/java/password/pwm/util/java/CollectionUtil.java

@@ -55,7 +55,7 @@ public class CollectionUtil
     {
         if ( input == null )
         {
-            return Collections.emptyList();
+            return List.of();
         }
 
         return input.stream()
@@ -67,7 +67,7 @@ public class CollectionUtil
     {
         if ( input == null )
         {
-            return Collections.emptySet();
+            return Set.of();
         }
 
         return input.stream()
@@ -79,7 +79,7 @@ public class CollectionUtil
     {
         if ( input == null )
         {
-            return Collections.emptyMap();
+            return Map.of();
         }
 
         final Stream<Map.Entry<K, V>> stream = input.entrySet().stream()
@@ -170,6 +170,13 @@ public class CollectionUtil
                 : EnumSet.copyOf( source );
     }
 
+    public static <E extends Enum<E>> EnumSet<E> copyToEnumSet( final Set<E> source, final Class<E> classOfT )
+    {
+        return isEmpty( source )
+                ? EnumSet.noneOf( classOfT )
+                : EnumSet.copyOf( source );
+    }
+
     public static <E> List<E> iteratorToList( final Iterator<E> iterator )
     {
         return iteratorToStream( iterator )
@@ -218,4 +225,25 @@ public class CollectionUtil
     {
         return entry != null && entry.getKey() != null && entry.getValue() != null;
     }
+
+    public static <E extends Enum<E>, V> Map<E, V> unmodifiableEnumMap( final Map<E, V> inputSet, final Class<E> classOfT )
+    {
+        if ( CollectionUtil.isEmpty( inputSet ) )
+        {
+            return Map.of();
+        }
+
+        return Collections.unmodifiableMap( copiedEnumMap( inputSet, classOfT ) );
+    }
+
+    public static <E extends Enum<E>> Set<E> unmodifiableEnumSet( final Set<E> inputSet, final Class<E> classOfT )
+    {
+        if ( CollectionUtil.isEmpty( inputSet ) )
+        {
+            return Set.of();
+        }
+
+        return Collections.unmodifiableSet( copyToEnumSet( inputSet, classOfT ) );
+    }
+
 }

+ 28 - 1
lib-util/src/main/java/password/pwm/util/java/CollectorUtil.java

@@ -25,6 +25,7 @@ import java.util.Comparator;
 import java.util.EnumMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.function.Function;
@@ -83,7 +84,8 @@ public class CollectorUtil
     )
     {
         final Collector<T, ?, Map<K, U>> wrappedCollector = toEnumMap( keyClass, keyMapper, valueMapper );
-        return Collectors.collectingAndThen( wrappedCollector, Collections::unmodifiableMap );
+        return Collectors.collectingAndThen( wrappedCollector,
+                s -> CollectionUtil.unmodifiableEnumMap( s, keyClass ) );
     }
 
     public static <T, K extends Enum<K>, U> Collector<T, ?, Map<K, U>> toEnumMap(
@@ -99,6 +101,31 @@ public class CollectorUtil
                 () -> new EnumMap<>( keyClass ) );
     }
 
+    public static <T, K extends Enum<K>, U> Collector<T, ?, Set<K>> toUnmodifiableEnumSet(
+            final Class<K> keyClass,
+            final Function<? super T, ? extends K> keyMapper
+    )
+    {
+        final Collector<T, ?, Set<K>> wrappedCollector = toEnumSet( keyClass, keyMapper );
+        return Collectors.collectingAndThen( wrappedCollector, s -> CollectionUtil.unmodifiableEnumSet( s, keyClass ) );
+    }
+
+    public static <T, K extends Enum<K>, U> Collector<T, ?, Set<K>> toEnumSet(
+            final Class<K> keyClass,
+            final Function<? super T, ? extends K> keyMapper
+    )
+    {
+        final Function<? super T, Boolean> valueMapper = ( Function<T, Boolean> ) t -> Boolean.FALSE;
+
+        final Collector<T, ?, Map<K, Boolean>> wrappedCollector = Collectors.toMap(
+                keyMapper,
+                valueMapper,
+                CollectorUtil::errorOnDuplicateMergeOperator,
+                () -> new EnumMap<>( keyClass ) );
+
+        return Collectors.collectingAndThen( wrappedCollector, ( s ) -> CollectionUtil.copyToEnumSet( s.keySet(), keyClass ) );
+    }
+
     static <V> V errorOnDuplicateMergeOperator( final V u, final V u2 )
     {
         throw new IllegalStateException( "Duplicate key " + u );

+ 5 - 5
lib-util/src/test/java/password/pwm/util/java/AtomicLoopIntIncrementerTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class AtomicLoopIntIncrementerTest
 {
@@ -33,16 +33,16 @@ public class AtomicLoopIntIncrementerTest
         for ( int i = 0; i < 5; i++ )
         {
             final int next = atomicLoopIntIncrementer.next();
-            Assert.assertEquals( i, next );
+            Assertions.assertEquals( i, next );
         }
 
-        Assert.assertEquals( 0,  atomicLoopIntIncrementer.next() );
+        Assertions.assertEquals( 0,  atomicLoopIntIncrementer.next() );
 
         for ( int i = 0; i < 5; i++ )
         {
             atomicLoopIntIncrementer.next();
         }
 
-        Assert.assertEquals( 1,  atomicLoopIntIncrementer.next() );
+        Assertions.assertEquals( 1,  atomicLoopIntIncrementer.next() );
     }
 }

+ 5 - 5
lib-util/src/test/java/password/pwm/util/java/AverageTrackerTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class AverageTrackerTest
 {
@@ -34,7 +34,7 @@ public class AverageTrackerTest
         averageTracker.addSample( 7 );
         averageTracker.addSample( 8 );
         averageTracker.addSample( 9 );
-        Assert.assertEquals( 7, averageTracker.avgAsLong() );
+        Assertions.assertEquals( 7, averageTracker.avgAsLong() );
     }
 
     @Test
@@ -48,7 +48,7 @@ public class AverageTrackerTest
         averageTracker.addSample( 9 );
         averageTracker.addSample( 10 );
         averageTracker.addSample( 15 );
-        Assert.assertEquals( 9, averageTracker.avgAsLong() );
+        Assertions.assertEquals( 9, averageTracker.avgAsLong() );
     }
 
     @Test
@@ -60,6 +60,6 @@ public class AverageTrackerTest
         averageTracker.addSample( 9_223_372_036_854_775_805L  );
         averageTracker.addSample( 9_223_372_036_854_775_804L  );
         averageTracker.addSample( 9_223_372_036_854_775_803L  );
-        Assert.assertEquals( 9_223_372_036_854_775_805L, averageTracker.avgAsLong() );
+        Assertions.assertEquals( 9_223_372_036_854_775_805L, averageTracker.avgAsLong() );
     }
 }

+ 37 - 14
lib-util/src/test/java/password/pwm/util/java/CollectorUtilTest.java

@@ -21,12 +21,14 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
 
 public class CollectorUtilTest
 {
@@ -46,13 +48,13 @@ public class CollectorUtilTest
                         Map.Entry::getValue ) );
 
         final Iterator<String> iter = outputMap.values().iterator();
-        Assert.assertEquals( "1", iter.next() );
-        Assert.assertEquals( "2", iter.next() );
-        Assert.assertEquals( "3", iter.next() );
-        Assert.assertEquals( "4", iter.next() );
-        Assert.assertEquals( "5", iter.next() );
+        Assertions.assertEquals( "1", iter.next() );
+        Assertions.assertEquals( "2", iter.next() );
+        Assertions.assertEquals( "3", iter.next() );
+        Assertions.assertEquals( "4", iter.next() );
+        Assertions.assertEquals( "5", iter.next() );
 
-        Assert.assertEquals( "java.util.LinkedHashMap", outputMap.getClass().getName() );
+        Assertions.assertEquals( "java.util.LinkedHashMap", outputMap.getClass().getName() );
 
         outputMap.put( "testKey", "testValue" );
     }
@@ -73,12 +75,33 @@ public class CollectorUtilTest
                         Map.Entry::getValue ) );
 
         final Iterator<String> iter = outputMap.values().iterator();
-        Assert.assertEquals( "1", iter.next() );
-        Assert.assertEquals( "2", iter.next() );
-        Assert.assertEquals( "3", iter.next() );
-        Assert.assertEquals( "4", iter.next() );
-        Assert.assertEquals( "5", iter.next() );
+        Assertions.assertEquals( "1", iter.next() );
+        Assertions.assertEquals( "2", iter.next() );
+        Assertions.assertEquals( "3", iter.next() );
+        Assertions.assertEquals( "4", iter.next() );
+        Assertions.assertEquals( "5", iter.next() );
 
-        Assert.assertThrows( UnsupportedOperationException.class, () -> outputMap.put( "testKey", "testValue" ) );
+        Assertions.assertThrows( UnsupportedOperationException.class, () -> outputMap.put( "testKey", "testValue" ) );
+    }
+
+    private enum TestEnum
+    {
+        ONE,
+        TWO,
+        THREE,
+        FOUR,
+        FIVE,
+        SIX,
+    }
+
+    @Test
+    public void collectorToUnmodifiableEnumSet()
+    {
+        final Set<TestEnum> testSet = CollectionUtil.enumStream( TestEnum.class )
+                .collect( CollectorUtil.toUnmodifiableEnumSet( TestEnum.class, Function.identity() ) );
+
+        Assertions.assertEquals( 6, testSet.size() );
+        Assertions.assertEquals( TestEnum.ONE, testSet.iterator().next() );
+        Assertions.assertThrows( UnsupportedOperationException.class, () -> testSet.remove( TestEnum.ONE ) );
     }
 }

+ 35 - 35
lib-util/src/test/java/password/pwm/util/java/CopyingInputStreamTest.java

@@ -21,9 +21,9 @@
 package password.pwm.util.java;
 
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -64,7 +64,7 @@ public class CopyingInputStreamTest
 
 
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
         final InputStream input = new ByteArrayInputStream( "abc".getBytes( ASCII ) );
@@ -75,70 +75,70 @@ public class CopyingInputStreamTest
     @Test
     public void testReadNothing() throws Exception
     {
-        Assert.assertEquals( "", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( "", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testReadOneByte() throws Exception
     {
-        Assert.assertEquals( 'a', copyingStream.read() );
-        Assert.assertEquals( "a", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 'a', copyingStream.read() );
+        Assertions.assertEquals( "a", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testReadEverything() throws Exception
     {
-        Assert.assertEquals( 'a', copyingStream.read() );
-        Assert.assertEquals( 'b', copyingStream.read() );
-        Assert.assertEquals( 'c', copyingStream.read() );
-        Assert.assertEquals( -1, copyingStream.read() );
-        Assert.assertEquals( "abc", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 'a', copyingStream.read() );
+        Assertions.assertEquals( 'b', copyingStream.read() );
+        Assertions.assertEquals( 'c', copyingStream.read() );
+        Assertions.assertEquals( -1, copyingStream.read() );
+        Assertions.assertEquals( "abc", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testReadToArray() throws Exception
     {
         final byte[] buffer = new byte[8];
-        Assert.assertEquals( 3, copyingStream.read( buffer ) );
-        Assert.assertEquals( 'a', buffer[0] );
-        Assert.assertEquals( 'b', buffer[1] );
-        Assert.assertEquals( 'c', buffer[2] );
-        Assert.assertEquals( -1, copyingStream.read( buffer ) );
-        Assert.assertEquals( "abc", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 3, copyingStream.read( buffer ) );
+        Assertions.assertEquals( 'a', buffer[0] );
+        Assertions.assertEquals( 'b', buffer[1] );
+        Assertions.assertEquals( 'c', buffer[2] );
+        Assertions.assertEquals( -1, copyingStream.read( buffer ) );
+        Assertions.assertEquals( "abc", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testReadToArrayWithOffset() throws Exception
     {
         final byte[] buffer = new byte[8];
-        Assert.assertEquals( 3, copyingStream.read( buffer, 4, 4 ) );
-        Assert.assertEquals( 'a', buffer[4] );
-        Assert.assertEquals( 'b', buffer[5] );
-        Assert.assertEquals( 'c', buffer[6] );
-        Assert.assertEquals( -1, copyingStream.read( buffer, 4, 4 ) );
-        Assert.assertEquals( "abc", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 3, copyingStream.read( buffer, 4, 4 ) );
+        Assertions.assertEquals( 'a', buffer[4] );
+        Assertions.assertEquals( 'b', buffer[5] );
+        Assertions.assertEquals( 'c', buffer[6] );
+        Assertions.assertEquals( -1, copyingStream.read( buffer, 4, 4 ) );
+        Assertions.assertEquals( "abc", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testSkip() throws Exception
     {
-        Assert.assertEquals( 'a', copyingStream.read() );
-        Assert.assertEquals( 1, copyingStream.skip( 1 ) );
-        Assert.assertEquals( 'c', copyingStream.read() );
-        Assert.assertEquals( -1, copyingStream.read() );
-        Assert.assertEquals( "ac", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 'a', copyingStream.read() );
+        Assertions.assertEquals( 1, copyingStream.skip( 1 ) );
+        Assertions.assertEquals( 'c', copyingStream.read() );
+        Assertions.assertEquals( -1, copyingStream.read() );
+        Assertions.assertEquals( "ac", new String( output.bytes(), ASCII ) );
     }
 
     @Test
     public void testMarkReset() throws Exception
     {
-        Assert.assertEquals( 'a', copyingStream.read() );
+        Assertions.assertEquals( 'a', copyingStream.read() );
         copyingStream.mark( 1 );
-        Assert.assertEquals( 'b', copyingStream.read() );
+        Assertions.assertEquals( 'b', copyingStream.read() );
         copyingStream.reset();
-        Assert.assertEquals( 'b', copyingStream.read() );
-        Assert.assertEquals( 'c', copyingStream.read() );
-        Assert.assertEquals( -1, copyingStream.read() );
-        Assert.assertEquals( "abbc", new String( output.bytes(), ASCII ) );
+        Assertions.assertEquals( 'b', copyingStream.read() );
+        Assertions.assertEquals( 'c', copyingStream.read() );
+        Assertions.assertEquals( -1, copyingStream.read() );
+        Assertions.assertEquals( "abbc", new String( output.bytes(), ASCII ) );
     }
 }

+ 4 - 4
lib-util/src/test/java/password/pwm/util/java/JavaHelperTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class JavaHelperTest
 {
@@ -39,7 +39,7 @@ public class JavaHelperTest
                 };
 
         final byte[] output = JavaHelper.concatByteArrays( byteArray1, byteArray2 );
-        Assert.assertArrayEquals( new byte[]
+        Assertions.assertArrayEquals( new byte[]
                 {
                         0, 122, 5, 6, 121, 19,
                 },
@@ -66,7 +66,7 @@ public class JavaHelperTest
                 };
 
         final byte[] output = JavaHelper.concatByteArrays( byteArray1, byteArray2, byteArray3, byteArray4 );
-        Assert.assertArrayEquals( new byte[]
+        Assertions.assertArrayEquals( new byte[]
                 {
                         0, 122, 5, 37, 21, 14,
                 },

+ 11 - 8
lib-util/src/test/java/password/pwm/util/java/LazySupplierTest.java

@@ -20,20 +20,23 @@
 
 package password.pwm.util.java;
 
-import junit.framework.TestCase;
-import org.junit.Assert;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
-public class LazySupplierTest extends TestCase
+public class LazySupplierTest
 {
+    @Test
     public void testCreate()
     {
         final LazySupplier<String> supplier = LazySupplier.create( () -> "test1" );
 
-        Assert.assertFalse( supplier.isSupplied() );
-        Assert.assertEquals( "test1", supplier.get() );
-        Assert.assertTrue( supplier.isSupplied() );
+        Assertions.assertFalse( supplier.isSupplied() );
+        Assertions.assertEquals( "test1", supplier.get() );
+        Assertions.assertTrue( supplier.isSupplied() );
+
         supplier.clear();
-        Assert.assertFalse( supplier.isSupplied() );
-        Assert.assertEquals( "test1", supplier.get() );
+
+        Assertions.assertFalse( supplier.isSupplied() );
+        Assertions.assertEquals( "test1", supplier.get() );
     }
 }

+ 21 - 21
lib-util/src/test/java/password/pwm/util/java/StringUtilTest.java

@@ -21,8 +21,8 @@
 package password.pwm.util.java;
 
 import org.apache.commons.lang3.RandomStringUtils;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.io.IOException;
 
@@ -33,7 +33,7 @@ public class StringUtilTest
     {
         final String input = "this is a test this is a test this is a test.";
         final String expected = "this is a !test this !is a test !this is a !test.";
-        Assert.assertEquals( expected, StringUtil.repeatedInsert( input, 10, "!" ) );
+        Assertions.assertEquals( expected, StringUtil.repeatedInsert( input, 10, "!" ) );
     }
 
 
@@ -42,7 +42,7 @@ public class StringUtilTest
     {
         final String input = " this is a \n test \t string\r\nsecond line ";
         final String expected = "thisisateststringsecondline";
-        Assert.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
+        Assertions.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
     }
 
     @Test
@@ -50,7 +50,7 @@ public class StringUtilTest
     {
         final String input = " this is a \n test \t string\r\nsecond line ";
         final String expected = "thisisateststringsecondline";
-        Assert.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
+        Assertions.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
     }
 
     @Test
@@ -58,7 +58,7 @@ public class StringUtilTest
     {
         final String input = "nochangetest";
         final String expected = "nochangetest";
-        Assert.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
+        Assertions.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
     }
 
     @Test
@@ -92,7 +92,7 @@ public class StringUtilTest
                 + "sLd5kinMLYBq8I4g4Xmk/gNHE+r1hspZcX30BJZr01lYPf7TMSVcGDiEo+afgv2MW5gxTs14nhr9hctJqvIni5ly/D6q1UEL2tU2ob8cbkdJf17ZSHwD2f2L"
                 + "SaCYJkJA69aSEaRkCldUxPUd1gJea6zuxICaEnL6VpPX/78whQYwvwt/Tv9XBZ0k7YXDK/umdaisLRbvfXknsuvCnQsH6qqF0wGjIChBWUMo0oHjqvbsezt3"
                 + "tkBigAVBRQHvFwY+3sAzm2fTYS5yh+Rp/BIAV0AecPUeybQ=";
-        Assert.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
+        Assertions.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
     }
 
     @Test
@@ -163,7 +163,7 @@ public class StringUtilTest
                 + "g";
         final String expected = "H4sIAAAAAAAAAKR7A5Rly5ZtVlbatm3btm3bNipt27Ztm5W2baPS/97X/bvve79H9e3+Z4w9ttaaJ2LuWDNW7IgtJ/kdCAIADAwMQNViXcL1eWngGAAAIOcb"
                 + "AADSH3tpYSV+anEZEVppfhlxEWFFJRppEe/YTYlBOrig6+/uIVw/sDUi8JBprZYhUSn8d6qkEupMWKUt4rXbba+HabTf+yr8HHmmJzNRqnwK4BpQ7/g";
-        Assert.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
+        Assertions.assertEquals( expected, StringUtil.stripAllWhitespace( input ) );
     }
 
     @Test
@@ -173,9 +173,9 @@ public class StringUtilTest
 
         final String original = RandomStringUtils.random( 1024 * 1024, true, true );
         final String linebreaks = StringUtil.insertRepeatedLineBreaks( original, 80 );
-        Assert.assertEquals( lineSeparator, linebreaks.substring( 80, 80 + lineSeparator.length() ) );
+        Assertions.assertEquals( lineSeparator, linebreaks.substring( 80, 80 + lineSeparator.length() ) );
         final String stripped = StringUtil.stripAllWhitespace( linebreaks );
-        Assert.assertEquals( original, stripped );
+        Assertions.assertEquals( original, stripped );
     }
 
     @Test
@@ -184,14 +184,14 @@ public class StringUtilTest
     {
         final String input = "0�\u0000\u0000\u0000\u0007\u0002\u0001\u0001\u0002\u0002�\u007F";
         final String expected = "0�?????????�?";
-        Assert.assertEquals( expected, StringUtil.cleanNonPrintableCharacters( input ) );
+        Assertions.assertEquals( expected, StringUtil.cleanNonPrintableCharacters( input ) );
     }
 
     @Test
     public void urlPathEncodeTest()
     {
         final String input = "dsad(dsadaasds)dsdasdad";
-        Assert.assertEquals( "dsad%28dsadaasds%29dsdasdad", StringUtil.urlPathEncode( input ) );
+        Assertions.assertEquals( "dsad%28dsadaasds%29dsdasdad", StringUtil.urlPathEncode( input ) );
     }
 
     @Test
@@ -217,7 +217,7 @@ public class StringUtilTest
                 + "IFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKBIFAUCQKB"
                 + "IFAUCQKB";
 
-        Assert.assertEquals( expectedValue, b32value );
+        Assertions.assertEquals( expectedValue, b32value );
     }
 
     private static byte[] makeB64inputByteArray()
@@ -259,55 +259,55 @@ public class StringUtilTest
     public void base64TestEncode() throws Exception
     {
         final String b64string = StringUtil.base64Encode( makeB64inputByteArray() );
-        Assert.assertEquals( B64_TEST, b64string );
+        Assertions.assertEquals( B64_TEST, b64string );
     }
 
     @Test
     public void base64TestDecode() throws Exception
     {
         final byte[] b64array = StringUtil.base64Decode( B64_TEST );
-        Assert.assertArrayEquals( makeB64inputByteArray(), b64array );
+        Assertions.assertArrayEquals( makeB64inputByteArray(), b64array );
     }
 
     @Test
     public void base64TestEncodeUrlSafe() throws Exception
     {
         final String b64string = StringUtil.base64Encode( makeB64inputByteArray(), StringUtil.Base64Options.URL_SAFE );
-        Assert.assertEquals( B64_TEST_URL_SAFE, b64string );
+        Assertions.assertEquals( B64_TEST_URL_SAFE, b64string );
     }
 
     @Test
     public void base64TestDecodeUrlSafe() throws Exception
     {
         final byte[] b64array = StringUtil.base64Decode( B64_TEST_URL_SAFE, StringUtil.Base64Options.URL_SAFE );
-        Assert.assertArrayEquals( makeB64inputByteArray(), b64array );
+        Assertions.assertArrayEquals( makeB64inputByteArray(), b64array );
     }
 
     @Test
     public void base64TestEncodeGzipAndUrlSafe() throws Exception
     {
         final String b64string = StringUtil.base64Encode( makeB64inputByteArray(), StringUtil.Base64Options.URL_SAFE, StringUtil.Base64Options.GZIP );
-        Assert.assertEquals( B64_TEST_GZIP_URL_SAFE, b64string );
+        Assertions.assertEquals( B64_TEST_GZIP_URL_SAFE, b64string );
     }
 
     @Test
     public void base64TestDecodeGzipAndUrlSafe() throws Exception
     {
         final byte[] b64array = StringUtil.base64Decode( B64_TEST_GZIP_URL_SAFE, StringUtil.Base64Options.URL_SAFE, StringUtil.Base64Options.GZIP );
-        Assert.assertArrayEquals( makeB64inputByteArray(), b64array );
+        Assertions.assertArrayEquals( makeB64inputByteArray(), b64array );
     }
 
     @Test
     public void base64TestEncodeGzip() throws Exception
     {
         final String b64string = StringUtil.base64Encode( makeB64inputByteArray(), StringUtil.Base64Options.GZIP );
-        Assert.assertEquals( B64_TEST_GZIP, b64string );
+        Assertions.assertEquals( B64_TEST_GZIP, b64string );
     }
 
     @Test
     public void base64TestDecodeGzip() throws Exception
     {
         final byte[] b64array = StringUtil.base64Decode( B64_TEST_GZIP, StringUtil.Base64Options.GZIP );
-        Assert.assertArrayEquals( makeB64inputByteArray(), b64array );
+        Assertions.assertArrayEquals( makeB64inputByteArray(), b64array );
     }
 }

+ 12 - 6
pom.xml

@@ -147,7 +147,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>3.4.0</version>
+                <version>3.4.1</version>
                 <executions>
                     <execution>
                         <goals>
@@ -249,7 +249,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>3.1.2</version>
+                <version>3.2.0</version>
                 <dependencies>
                     <dependency>
                         <groupId>com.puppycrawl.tools</groupId>
@@ -396,7 +396,7 @@
             <plugin>
                 <groupId>org.owasp</groupId>
                 <artifactId>dependency-check-maven</artifactId>
-                <version>7.1.1</version>
+                <version>7.1.2</version>
                 <executions>
                     <execution>
                         <goals>
@@ -506,9 +506,15 @@
 
         <!-- Test dependencies -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.13.2</version>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <version>5.9.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-all</artifactId>
+            <version>1.3</version>
             <scope>test</scope>
         </dependency>
         <dependency>

+ 6 - 0
server/pom.xml

@@ -299,6 +299,12 @@
             <artifactId>commons-compress</artifactId>
             <version>1.21</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>9.0.65</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <repositories>

+ 5 - 6
server/src/main/java/password/pwm/config/PwmSettingCategory.java

@@ -26,6 +26,7 @@ import password.pwm.bean.ProfileID;
 import password.pwm.i18n.Config;
 import password.pwm.util.i18n.LocaleHelper;
 import password.pwm.util.java.CollectionUtil;
+import password.pwm.util.java.CollectorUtil;
 import password.pwm.util.java.JavaHelper;
 import password.pwm.util.java.LazySupplier;
 import password.pwm.util.macro.MacroRequest;
@@ -510,19 +511,17 @@ public enum PwmSettingCategory
 
         public static Set<PwmSettingCategory> readChildren( final PwmSettingCategory category )
         {
-            final Set<PwmSettingCategory> categories = CollectionUtil.enumStream( PwmSettingCategory.class )
+            return CollectionUtil.enumStream( PwmSettingCategory.class )
                     .filter( ( loopCategory ) -> loopCategory.getParent() == category )
-                    .collect( Collectors.toUnmodifiableSet() );
-            return Collections.unmodifiableSet( CollectionUtil.copyToEnumSet( categories, PwmSettingCategory.class ) );
+                    .collect( CollectorUtil.toUnmodifiableEnumSet( PwmSettingCategory.class, s -> s ) );
         }
 
         public static Set<PwmSetting> readSettings( final PwmSettingCategory category )
         {
-            final Set<PwmSetting> settings = EnumSet.allOf( PwmSetting.class )
+            return EnumSet.allOf( PwmSetting.class )
                     .stream()
                     .filter( ( setting ) -> setting.getCategory() == category )
-                    .collect( Collectors.toSet() );
-            return Collections.unmodifiableSet( CollectionUtil.copyToEnumSet( settings, PwmSetting.class ) );
+                    .collect( CollectorUtil.toUnmodifiableEnumSet( PwmSetting.class, s -> s ) );
         }
     }
 }

+ 1 - 1
server/src/main/java/password/pwm/health/LocalDBHealthChecker.java

@@ -80,7 +80,7 @@ public class LocalDBHealthChecker implements HealthSupplier
             healthRecords.add( HealthRecord.forMessage( DomainID.systemId(), HealthMessage.LocalDB_OK ) );
         }
 
-        return healthRecords;
+        return List.copyOf( healthRecords );
     }
 
     private List<HealthRecord> checkSpaceRemaining( final PwmApplication pwmApplication )

+ 8 - 0
server/src/main/java/password/pwm/util/java/FileSystemUtility.java

@@ -183,4 +183,12 @@ public class FileSystemUtility
             Files.delete( nextPath );
         }
     }
+
+    public static File createDirectory( final Path basePath, final String newDirectoryName )
+            throws IOException
+    {
+        final Path path = Path.of( basePath.toString() + File.separator + newDirectoryName );
+        final Path newPath = Files.createDirectories( path );
+        return newPath.toFile();
+    }
 }

+ 6 - 6
server/src/test/java/password/pwm/AppPropertyTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.Enumeration;
 import java.util.HashSet;
@@ -37,7 +37,7 @@ public class AppPropertyTest
         for ( final AppProperty appProperty : AppProperty.values() )
         {
             final String value = appProperty.getDefaultValue();
-            Assert.assertNotNull( "AppProperty " + appProperty + " does not have a value", value );
+            Assertions.assertNotNull( "AppProperty " + appProperty + " does not have a value", value );
         }
     }
 
@@ -47,7 +47,7 @@ public class AppPropertyTest
         for ( final AppProperty appProperty : AppProperty.values() )
         {
             final String key = appProperty.getKey();
-            Assert.assertNotNull( "AppProperty " + appProperty + " does not have a key", key );
+            Assertions.assertNotNull( "AppProperty " + appProperty + " does not have a key", key );
         }
     }
 
@@ -72,7 +72,7 @@ public class AppPropertyTest
         bundleKeysMissingEnum.removeAll( allEnumKeys );
         if ( !bundleKeysMissingEnum.isEmpty() )
         {
-            Assert.fail( "AppProperty resource bundle contains key " + bundleKeysMissingEnum.iterator().next()
+            Assertions.fail( "AppProperty resource bundle contains key " + bundleKeysMissingEnum.iterator().next()
                     + " does not have a corresponding Enum value" );
         }
 
@@ -80,7 +80,7 @@ public class AppPropertyTest
         enumKeysMissingResource.removeAll( allResourceBundleKeys );
         if ( !enumKeysMissingResource.isEmpty() )
         {
-            Assert.fail( "AppProperty enum contains key " + bundleKeysMissingEnum.iterator().next()
+            Assertions.fail( "AppProperty enum contains key " + bundleKeysMissingEnum.iterator().next()
                     + " does not have a corresponding resource bundle value" );
         }
     }

+ 18 - 18
server/src/test/java/password/pwm/PwmDomainUtilTest.java

@@ -21,8 +21,8 @@
 package password.pwm;
 
 import org.jetbrains.annotations.NotNull;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.config.AppConfig;
 import password.pwm.config.PwmSetting;
@@ -47,10 +47,10 @@ public class PwmDomainUtilTest
     {
         final Map<PwmDomainUtil.DomainModifyCategory, Set<DomainID>> categorizations = doSimpleCategorizationWithNewDomainList( INITIAL_DOMAIN_LIST );
 
-        Assert.assertEquals( 3, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
+        Assertions.assertEquals( 3, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
     }
 
     @Test
@@ -59,10 +59,10 @@ public class PwmDomainUtilTest
     {
         final Map<PwmDomainUtil.DomainModifyCategory, Set<DomainID>> categorizations = doSimpleCategorizationWithNewDomainList( List.of( "acme1", "acme2"  ) );
 
-        Assert.assertEquals( 2, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
-        Assert.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
+        Assertions.assertEquals( 2, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
+        Assertions.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
     }
 
     @Test
@@ -71,10 +71,10 @@ public class PwmDomainUtilTest
     {
         final Map<PwmDomainUtil.DomainModifyCategory, Set<DomainID>> categorizations = doSimpleCategorizationWithNewDomainList( List.of( "acme1", "acme2", "acme3", "acme4" ) );
 
-        Assert.assertEquals( 3, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
-        Assert.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
+        Assertions.assertEquals( 3, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
+        Assertions.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
     }
 
     @Test
@@ -88,10 +88,10 @@ public class PwmDomainUtilTest
 
         final Map<PwmDomainUtil.DomainModifyCategory, Set<DomainID>> categorizations = PwmDomainUtil.categorizeDomainModifications( modifiedConfig, initialConfig );
 
-        Assert.assertEquals( 2, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
-        Assert.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
-        Assert.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
+        Assertions.assertEquals( 2, categorizations.get( PwmDomainUtil.DomainModifyCategory.unchanged ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.removed ).size() );
+        Assertions.assertEquals( 0, categorizations.get( PwmDomainUtil.DomainModifyCategory.created ).size() );
+        Assertions.assertEquals( 1, categorizations.get( PwmDomainUtil.DomainModifyCategory.modified ).size() );
     }
 
     @NotNull

+ 5 - 5
server/src/test/java/password/pwm/bean/DomainIDTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.bean;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -39,8 +39,8 @@ public class DomainIDTest
 
         Collections.sort( list );
 
-        Assert.assertEquals( DomainID.systemId(), list.get( 0 ) );
-        Assert.assertEquals( DomainID.create( "aaaa" ), list.get( 1 ) );
-        Assert.assertEquals( DomainID.create( "bbbb" ), list.get( 2 ) );
+        Assertions.assertEquals( DomainID.systemId(), list.get( 0 ) );
+        Assertions.assertEquals( DomainID.create( "aaaa" ), list.get( 1 ) );
+        Assertions.assertEquals( DomainID.create( "bbbb" ), list.get( 2 ) );
     }
 }

+ 4 - 4
server/src/test/java/password/pwm/bean/ProfileIDTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.bean;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -39,8 +39,8 @@ public class ProfileIDTest
 
         Collections.sort( list );
 
-        Assert.assertEquals( ProfileID.create( "aaaa" ), list.get( 0 ) );
-        Assert.assertEquals( ProfileID.create( "bbbb" ), list.get( 1 ) );
+        Assertions.assertEquals( ProfileID.create( "aaaa" ), list.get( 0 ) );
+        Assertions.assertEquals( ProfileID.create( "bbbb" ), list.get( 1 ) );
     }
 
     @Test

+ 15 - 12
server/src/test/java/password/pwm/config/DomainConfigTest.java

@@ -20,10 +20,9 @@
 
 package password.pwm.config;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.bean.DomainID;
 import password.pwm.bean.ProfileID;
@@ -33,16 +32,19 @@ import password.pwm.config.stored.StoredConfigurationFactory;
 import password.pwm.config.stored.StoredConfigurationModifier;
 import password.pwm.config.value.StringArrayValue;
 import password.pwm.error.PwmUnrecoverableException;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.localdb.TestHelper;
 
+import java.io.File;
 import java.io.IOException;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
 
 public class DomainConfigTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     @Test
     public void testLdapProfileOrdering()
@@ -53,16 +55,17 @@ public class DomainConfigTest
         final StoredConfigKey key = StoredConfigKey.forSetting( PwmSetting.LDAP_PROFILE_LIST, null, DomainID.DOMAIN_ID_DEFAULT );
         modifier.writeSetting( key, StringArrayValue.create( List.of( "ldap1", "ldap2", "ldap3", "ldap4", "ldap5" ) ), null );
 
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder(), AppConfig.forStoredConfig( modifier.newStoredConfiguration() ) );
+        final File localDbTestFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-testLdapProfileOrdering" );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( localDbTestFolder, AppConfig.forStoredConfig( modifier.newStoredConfiguration() ) );
         final AppConfig appConfig = pwmApplication.getConfig();
         final DomainConfig domainConfig = appConfig.getDomainConfigs().get( DomainID.DOMAIN_ID_DEFAULT );
 
         final List<ProfileID> ldapProfileIDs = new ArrayList<>( domainConfig.getLdapProfiles().keySet() );
 
-        Assert.assertEquals( ProfileID.create( "ldap1" ), ldapProfileIDs.get( 0 ) );
-        Assert.assertEquals( ProfileID.create( "ldap2" ), ldapProfileIDs.get( 1 ) );
-        Assert.assertEquals( ProfileID.create( "ldap3" ), ldapProfileIDs.get( 2 ) );
-        Assert.assertEquals( ProfileID.create( "ldap4" ), ldapProfileIDs.get( 3 ) );
-        Assert.assertEquals( ProfileID.create( "ldap5" ), ldapProfileIDs.get( 4 ) );
+        Assertions.assertEquals( ProfileID.create( "ldap1" ), ldapProfileIDs.get( 0 ) );
+        Assertions.assertEquals( ProfileID.create( "ldap2" ), ldapProfileIDs.get( 1 ) );
+        Assertions.assertEquals( ProfileID.create( "ldap3" ), ldapProfileIDs.get( 2 ) );
+        Assertions.assertEquals( ProfileID.create( "ldap4" ), ldapProfileIDs.get( 3 ) );
+        Assertions.assertEquals( ProfileID.create( "ldap5" ), ldapProfileIDs.get( 4 ) );
     }
 }

+ 6 - 6
server/src/test/java/password/pwm/config/PwmSettingCategoryTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 
 import java.util.EnumSet;
@@ -66,7 +66,7 @@ public class PwmSettingCategoryTest
             if ( category.hasProfiles() )
             {
                 final PwmSetting pwmSetting = category.getProfileSetting().orElseThrow( IllegalStateException::new );
-                Assert.assertEquals( PwmSettingSyntax.PROFILE, pwmSetting.getSyntax() );
+                Assertions.assertEquals( PwmSettingSyntax.PROFILE, pwmSetting.getSyntax() );
             }
         }
     }
@@ -80,8 +80,8 @@ public class PwmSettingCategoryTest
             {
                 final boolean hasChildren = !category.getChildren().isEmpty();
                 final boolean hasSettings = !category.getSettings().isEmpty();
-                Assert.assertTrue( hasChildren || hasSettings );
-                Assert.assertFalse( category.getKey() + " has both child categories and settings", hasChildren && hasSettings );
+                Assertions.assertTrue( hasChildren || hasSettings );
+                Assertions.assertFalse( hasChildren && hasSettings,  category.getKey() + " has both child categories and settings" );
             }
         }
     }
@@ -92,7 +92,7 @@ public class PwmSettingCategoryTest
         for ( final PwmSettingCategory category : PwmSettingCategory.values() )
         {
                 final PwmSettingScope scope = category.getScope();
-                Assert.assertNotNull( scope );
+                Assertions.assertNotNull( scope );
         }
     }
 

+ 12 - 11
server/src/test/java/password/pwm/config/PwmSettingPropertyTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 
 import java.util.EnumSet;
@@ -48,9 +48,9 @@ public class PwmSettingPropertyTest
             for ( final String key : keys )
             {
                 expectedKeys.add( key );
-                Assert.assertTrue(
-                        "PwmSettings.properties missing record for " + key,
-                        resourceBundle.containsKey( key ) );
+                Assertions.assertTrue(
+                        resourceBundle.containsKey( key ),
+                        "PwmSettings.properties missing record for " + key );
             }
         }
 
@@ -63,9 +63,10 @@ public class PwmSettingPropertyTest
             for ( final String key : keys )
             {
                 expectedKeys.add( key );
-                Assert.assertTrue(
-                        "PwmSettings.properties missing record for " + key,
-                        resourceBundle.containsKey( key ) );
+                Assertions.assertTrue(
+
+                        resourceBundle.containsKey( key ),
+                        "PwmSettings.properties missing record for " + key );
             }
         }
 
@@ -74,7 +75,7 @@ public class PwmSettingPropertyTest
 
         if ( !extraKeys.isEmpty() )
         {
-            Assert.fail( "unexpected key in PwmSetting.properties file: " + extraKeys.iterator().next() );
+            Assertions.fail( "unexpected key in PwmSetting.properties file: " + extraKeys.iterator().next() );
         }
     }
 
@@ -87,7 +88,7 @@ public class PwmSettingPropertyTest
             final long maxValue = Long.parseLong( pwmSetting.getProperties().getOrDefault( PwmSettingProperty.Maximum, "0" ) );
             if ( maxValue != 0 )
             {
-                Assert.assertTrue( "setting: " + pwmSetting.getKey(), maxValue > minValue );
+                Assertions.assertTrue( maxValue > minValue, "setting: " + pwmSetting.getKey() );
             }
         }
     }
@@ -118,7 +119,7 @@ public class PwmSettingPropertyTest
                     {
                         throw new NumberFormatException(
                                 "setting " + pwmSetting + " value for property " + pwmSettingProperty
-                                + " parse error: " + e.getMessage()
+                                        + " parse error: " + e.getMessage()
                         );
                     }
                 }

+ 3 - 3
server/src/test/java/password/pwm/config/PwmSettingTemplateTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.util.java.JavaHelper;
 
 import java.util.EnumSet;
@@ -55,7 +55,7 @@ public class PwmSettingTemplateTest
                 {
                     if ( !seenTemplatesOfType.contains( enumValue ) )
                     {
-                        Assert.fail( "PwmSettingTemplate enum value " + enumValue
+                        Assertions.fail( "PwmSettingTemplate enum value " + enumValue
                                 + " is missing corresponding option value in setting " + associatedSetting );
                     }
                 }

+ 13 - 18
server/src/test/java/password/pwm/config/PwmSettingTest.java

@@ -24,10 +24,8 @@ import org.jrivard.xmlchai.AccessMode;
 import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.stored.StoredConfigXmlConstants;
 import password.pwm.config.stored.XmlOutputProcessData;
@@ -49,9 +47,6 @@ import java.util.Set;
 
 public class PwmSettingTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
-
     @Test
     public void testDefaultValues() throws Exception
     {
@@ -74,7 +69,7 @@ public class PwmSettingTest
                 storedValue.toDebugJsonObject( PwmConstants.DEFAULT_LOCALE );
                 storedValue.toXmlValues( StoredConfigXmlConstants.XML_ELEMENT_VALUE, outputSettings );
                 storedValue.validateValue( pwmSetting );
-                Assert.assertNotNull( storedValue.valueHash() );
+                Assertions.assertNotNull( storedValue.valueHash() );
                 if ( storedValue.toNativeObject() != null )
                 {
                     JsonFactory.get().serialize( ( Serializable ) storedValue.toNativeObject() );
@@ -93,7 +88,7 @@ public class PwmSettingTest
         {
             final String expression = "/settings/setting[@key=\"" + pwmSetting.getKey() + "\"]";
             final Optional<XmlElement> xmlElement = xmlDoc.evaluateXpathToElement( expression );
-            Assert.assertTrue( "missing PwmSetting.xml setting reference for key " + pwmSetting.getKey(), xmlElement.isPresent() );
+            Assertions.assertTrue( xmlElement.isPresent(), "missing PwmSetting.xml setting reference for key " + pwmSetting.getKey() );
         }
     }
 
@@ -107,7 +102,7 @@ public class PwmSettingTest
         {
             final String expression = "/settings/setting[@key=\"" + pwmSetting.getKey() + "\"]";
             final List<XmlElement> results = xmlDoc.evaluateXpathToElements( expression );
-            Assert.assertFalse( "multiple PwmSetting.xml setting reference for key " + pwmSetting.getKey(), results.size() > 1 );
+            Assertions.assertFalse( results.size() > 1, "multiple PwmSetting.xml setting reference for key " + pwmSetting.getKey() );
         }
     }
 
@@ -124,9 +119,9 @@ public class PwmSettingTest
             final String key = result.getAttribute( "key" )
                     .orElseThrow( () -> new IllegalStateException( "setting element " + result.getName() + " missing key attribute" ) );
 
-            Assert.assertFalse( StringUtil.isEmpty( key ) );
+            Assertions.assertFalse( StringUtil.isEmpty( key ) );
             final Optional<PwmSetting> pwmSetting = PwmSetting.forKey( key );
-            Assert.assertTrue( "unknown PwmSetting.xml setting reference for key " + key, pwmSetting.isPresent() );
+            Assertions.assertTrue( pwmSetting.isPresent(), "unknown PwmSetting.xml setting reference for key " + key );
         }
     }
 
@@ -159,9 +154,9 @@ public class PwmSettingTest
     public void testFlagValues() throws PwmUnrecoverableException, PwmOperationalException
     {
         final Set<PwmSettingFlag> flags = PwmSetting.DOMAIN_LIST.getFlags();
-        Assert.assertEquals( 2, flags.size() );
-        Assert.assertTrue( flags.contains( PwmSettingFlag.Sorted ) );
-        Assert.assertTrue( flags.contains( PwmSettingFlag.ReloadEditorOnModify ) );
+        Assertions.assertEquals( 2, flags.size() );
+        Assertions.assertTrue( flags.contains( PwmSettingFlag.Sorted ) );
+        Assertions.assertTrue( flags.contains( PwmSettingFlag.ReloadEditorOnModify ) );
     }
 
     @Test
@@ -213,17 +208,17 @@ public class PwmSettingTest
         for ( final PwmSetting pwmSetting : PwmSetting.values() )
         {
             // duplicate key found
-            Assert.assertFalse( seenKeys.contains( pwmSetting.getKey() ) );
+            Assertions.assertFalse( seenKeys.contains( pwmSetting.getKey() ) );
             seenKeys.add( pwmSetting.getKey() );
         }
-        Assert.assertEquals( seenKeys.size(), PwmSetting.values().length );
+        Assertions.assertEquals( seenKeys.size(), PwmSetting.values().length );
     }
 
     @Test
     public void sortedByMenuLocation()
     {
         final List<PwmSetting> list = PwmSetting.sortedValues();
-        Assert.assertEquals( list.size(), PwmSetting.values().length );
+        Assertions.assertEquals( list.size(), PwmSetting.values().length );
     }
 
 

+ 15 - 15
server/src/test/java/password/pwm/config/PwmSettingXmlTest.java

@@ -24,10 +24,10 @@ import org.jrivard.xmlchai.AccessMode;
 import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.xml.sax.SAXParseException;
 import password.pwm.util.java.JavaHelper;
 
@@ -44,7 +44,7 @@ public class PwmSettingXmlTest
 {
     private static XmlDocument xmlDocument;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception
     {
         try ( InputStream inputStream = PwmSetting.class.getClassLoader().getResourceAsStream( PwmSettingXml.SETTING_XML_FILENAME ) )
@@ -53,7 +53,7 @@ public class PwmSettingXmlTest
         }
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDown()
     {
         xmlDocument = null;
@@ -65,7 +65,7 @@ public class PwmSettingXmlTest
         for ( final PwmSetting pwmSetting : PwmSetting.values() )
         {
             final XmlElement element = PwmSettingXml.readSettingXml( pwmSetting );
-            Assert.assertNotNull( "no XML settings node in PwmSetting.xml for setting " + pwmSetting.getKey(), element );
+            Assertions.assertNotNull( element, "no XML settings node in PwmSetting.xml for setting " + pwmSetting.getKey() );
         }
     }
 
@@ -73,7 +73,7 @@ public class PwmSettingXmlTest
     public void testXmlElementIsInSettings()
     {
         final List<XmlElement> settingElements = xmlDocument.evaluateXpathToElements( "/settings/setting" );
-        Assert.assertFalse( settingElements.isEmpty() );
+        Assertions.assertFalse( settingElements.isEmpty() );
         for ( final XmlElement element : settingElements )
         {
             final String key = element.getAttribute( "key" )
@@ -81,7 +81,7 @@ public class PwmSettingXmlTest
 
             final String errorMsg = "PwmSetting.xml contains setting key of '"
                     + key + "' which does not exist in PwmSetting.java";
-            Assert.assertNotNull( errorMsg, PwmSetting.forKey( key ) );
+            Assertions.assertNotNull( PwmSetting.forKey( key ), errorMsg );
         }
     }
 
@@ -91,7 +91,7 @@ public class PwmSettingXmlTest
         for ( final PwmSettingCategory pwmSettingCategory : PwmSettingCategory.values() )
         {
             final XmlElement element = PwmSettingXml.readCategoryXml( pwmSettingCategory );
-            Assert.assertNotNull( "no XML category node in PwmSetting.xml for setting " + pwmSettingCategory.getKey(), element );
+            Assertions.assertNotNull( element, "no XML category node in PwmSetting.xml for setting " + pwmSettingCategory.getKey() );
         }
     }
 
@@ -99,7 +99,7 @@ public class PwmSettingXmlTest
     public void testXmlElementIsInCategory()
     {
         final List<XmlElement> categoryElements = xmlDocument.evaluateXpathToElements( "/settings/category" );
-        Assert.assertFalse( categoryElements.isEmpty() );
+        Assertions.assertFalse( categoryElements.isEmpty() );
         for ( final XmlElement element : categoryElements )
         {
             final String key = element.getAttribute( "key" )
@@ -109,7 +109,7 @@ public class PwmSettingXmlTest
 
             final String errorMsg = "PwmSetting.xml contains category key of '"
                     + key + "' which does not exist in PwmSettingCategory.java";
-            Assert.assertNotNull( errorMsg, category );
+            Assertions.assertNotNull( category, errorMsg );
         }
     }
 
@@ -117,7 +117,7 @@ public class PwmSettingXmlTest
     public void testXmlCategoryProfileElementIsValidSetting()
     {
         final List<XmlElement> profileElements = xmlDocument.evaluateXpathToElements( "/settings/category/profile" );
-        Assert.assertFalse( profileElements.isEmpty() );
+        Assertions.assertFalse( profileElements.isEmpty() );
         for ( final XmlElement element : profileElements )
         {
             final String settingKey = element.getAttribute( "setting" )
@@ -127,7 +127,7 @@ public class PwmSettingXmlTest
 
             final String errorMsg = "PwmSetting.xml contains category/profile@setting key of '"
                     + settingKey + "' which does not exist in PwmSetting.java";
-            Assert.assertTrue( errorMsg, setting.isPresent() );
+            Assertions.assertTrue( setting.isPresent(), errorMsg );
         }
     }
 
@@ -146,7 +146,7 @@ public class PwmSettingXmlTest
         }
         catch ( final SAXParseException e )
         {
-            Assert.fail( "PwmSetting.xml schema violation: " + e.toString() );
+            Assertions.fail( "PwmSetting.xml schema violation: " + e );
         }
     }
 }

+ 6 - 6
server/src/test/java/password/pwm/config/StoredValueEncoderTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.config.value.StoredValueEncoder;
 import password.pwm.util.secure.PwmSecurityKey;
 
@@ -36,9 +36,9 @@ public class StoredValueEncoderTest
 
         final String encodedValue = StoredValueEncoder.encode( "password", StoredValueEncoder.Mode.ENCODED, pwmSecurityKey );
         final Optional<String> decodedValue = StoredValueEncoder.decode( encodedValue, StoredValueEncoder.Mode.ENCODED, pwmSecurityKey );
-        Assert.assertTrue( decodedValue.isPresent() );
-        Assert.assertEquals( "password", decodedValue.get() );
-        Assert.assertNotEquals( "password", encodedValue );
-        Assert.assertTrue( encodedValue.startsWith( StoredValueEncoder.Mode.ENCODED.getPrefix() ) );
+        Assertions.assertTrue( decodedValue.isPresent() );
+        Assertions.assertEquals( "password", decodedValue.get() );
+        Assertions.assertNotEquals( "password", encodedValue );
+        Assertions.assertTrue( encodedValue.startsWith( StoredValueEncoder.Mode.ENCODED.getPrefix() ) );
     }
 }

+ 1 - 1
server/src/test/java/password/pwm/config/option/IdentityVerificationMethodEnumTest.java

@@ -20,7 +20,7 @@
 
 package password.pwm.config.option;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.AppConfig;
 import password.pwm.config.stored.StoredConfigurationFactory;

+ 15 - 12
server/src/test/java/password/pwm/config/profile/PasswordRuleReaderHelperTest.java

@@ -20,16 +20,18 @@
 
 package password.pwm.config.profile;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.user.UserInfoBean;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.localdb.TestHelper;
 import password.pwm.util.macro.MacroRequest;
 import password.pwm.util.password.PasswordRuleReaderHelper;
 
+import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -38,8 +40,8 @@ import java.util.regex.Pattern;
 public class PasswordRuleReaderHelperTest
 {
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     private MacroRequest makeMacroRequest() throws Exception
     {
@@ -52,7 +54,8 @@ public class PasswordRuleReaderHelperTest
                     "sn", "Flintstone" );
         }
 
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder() );
+        final File testFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-makeMacroRequest" );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( testFolder );
 
         final UserInfoBean userInfo = UserInfoBean.builder()
                 .attributes( userAttributes )
@@ -81,8 +84,8 @@ public class PasswordRuleReaderHelperTest
         final List<Pattern> patterns = ruleHelper.readRegExSetting( PwmPasswordRule.RegExMatch, macroRequest, input );
 
         final String expected = "fflintstone, First Name: Fred, Last Name: Flintstone, Email: fred@flintstones.tv";
-        Assert.assertEquals( 1, patterns.size() );
-        Assert.assertEquals( expected, patterns.get( 0 ).pattern() );
+        Assertions.assertEquals( 1, patterns.size() );
+        Assertions.assertEquals( expected, patterns.get( 0 ).pattern() );
     }
 
     @Test
@@ -95,8 +98,8 @@ public class PasswordRuleReaderHelperTest
 
         final List<Pattern> patterns = ruleHelper.readRegExSetting( PwmPasswordRule.RegExMatch, macroRequest, input );
 
-        Assert.assertEquals( 2, patterns.size() );
-        Assert.assertEquals( "^fflintstone[0-9]+$", patterns.get( 0 ).pattern() );
-        Assert.assertEquals( "^password$", patterns.get( 1 ).pattern() );
+        Assertions.assertEquals( 2, patterns.size() );
+        Assertions.assertEquals( "^fflintstone[0-9]+$", patterns.get( 0 ).pattern() );
+        Assertions.assertEquals( "^password$", patterns.get( 1 ).pattern() );
     }
 }

+ 8 - 8
server/src/test/java/password/pwm/config/profile/ProfileUtilityTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config.profile;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.PwmSettingCategory;
 import password.pwm.config.PwmSettingSyntax;
@@ -36,9 +36,9 @@ public class ProfileUtilityTest
             if ( pwmSettingCategory.hasProfiles() )
             {
                 final PwmSetting profileSetting = pwmSettingCategory.getProfileSetting().get();
-                Assert.assertEquals( PwmSettingSyntax.PROFILE, profileSetting.getSyntax() );
-                Assert.assertFalse( profileSetting.getCategory().hasProfiles() );
-                Assert.assertEquals( pwmSettingCategory.getScope(), profileSetting.getCategory().getScope() );
+                Assertions.assertEquals( PwmSettingSyntax.PROFILE, profileSetting.getSyntax() );
+                Assertions.assertFalse( profileSetting.getCategory().hasProfiles() );
+                Assertions.assertEquals( pwmSettingCategory.getScope(), profileSetting.getCategory().getScope() );
             }
         }
     }
@@ -48,10 +48,10 @@ public class ProfileUtilityTest
     {
         for ( final ProfileDefinition profileDefinition : ProfileDefinition.values() )
         {
-            Assert.assertTrue( profileDefinition.getCategory().hasProfiles() );
+            Assertions.assertTrue( profileDefinition.getCategory().hasProfiles() );
             final PwmSetting profileSetting = profileDefinition.getCategory().getProfileSetting().get();
-            Assert.assertEquals( PwmSettingSyntax.PROFILE, profileSetting.getSyntax() );
-            Assert.assertFalse( profileSetting.getCategory().hasProfiles() );
+            Assertions.assertEquals( PwmSettingSyntax.PROFILE, profileSetting.getSyntax() );
+            Assertions.assertFalse( profileSetting.getCategory().hasProfiles() );
         }
     }
 }

+ 1 - 1
server/src/test/java/password/pwm/config/profile/PwmPasswordRuleTest.java

@@ -20,7 +20,7 @@
 
 package password.pwm.config.profile;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 
 public class PwmPasswordRuleTest

+ 14 - 14
server/src/test/java/password/pwm/config/stored/ConfigurationCleanerTest.java

@@ -20,10 +20,10 @@
 
 package password.pwm.config.stored;
 
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.bean.ProfileID;
 import password.pwm.config.AppConfig;
@@ -47,7 +47,7 @@ public class ConfigurationCleanerTest
     private static DomainConfig domainConfig;
     private static final DomainID DOMAIN_ID = DomainID.create( "default" );
 
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception
     {
         //PwmLogger.disableAllLogging();
@@ -59,7 +59,7 @@ public class ConfigurationCleanerTest
         }
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDown()
     {
         domainConfig = null;
@@ -69,7 +69,7 @@ public class ConfigurationCleanerTest
     public void testCleaningConfigFileLoaded()
     {
         final String notesText = domainConfig.readSettingAsString( PwmSetting.NOTES );
-        Assert.assertEquals( "deprecated-test-configuration-file", notesText );
+        Assertions.assertEquals( "deprecated-test-configuration-file", notesText );
     }
 
     @Test
@@ -77,12 +77,12 @@ public class ConfigurationCleanerTest
     {
         final List<ProfileID> profileList = StoredConfigurationUtil.profilesForSetting(
                 DOMAIN_ID, PwmSetting.PEOPLE_SEARCH_PHOTO_QUERY_FILTER, domainConfig.getStoredConfiguration() );
-        Assert.assertEquals( 1, profileList.size() );
+        Assertions.assertEquals( 1, profileList.size() );
 
         final PeopleSearchProfile peopleSearchProfile = domainConfig.getPeopleSearchProfiles().get( ProfileID.PROFILE_ID_DEFAULT );
         final List<UserPermission> userPermissionList = peopleSearchProfile.readSettingAsUserPermission( PwmSetting.PEOPLE_SEARCH_PHOTO_QUERY_FILTER );
         final UserPermission userPermission = userPermissionList.iterator().next();
-        Assert.assertEquals( "(|(cn=*smith*)(cn=*blake*)(givenName=*Margo*))", userPermission.getLdapQuery() );
+        Assertions.assertEquals( "(|(cn=*smith*)(cn=*blake*)(givenName=*Margo*))", userPermission.getLdapQuery() );
     }
 
     @Test
@@ -91,9 +91,9 @@ public class ConfigurationCleanerTest
 
         {
             final Set<WebServiceUsage> usages = domainConfig.readSettingAsOptionList( PwmSetting.WEBSERVICES_PUBLIC_ENABLE, WebServiceUsage.class );
-            Assert.assertEquals( 2, usages.size() );
-            Assert.assertTrue( usages.contains( WebServiceUsage.Statistics ) );
-            Assert.assertTrue( usages.contains( WebServiceUsage.Health ) );
+            Assertions.assertEquals( 2, usages.size() );
+            Assertions.assertTrue( usages.contains( WebServiceUsage.Statistics ) );
+            Assertions.assertTrue( usages.contains( WebServiceUsage.Health ) );
         }
     }
 
@@ -106,7 +106,7 @@ public class ConfigurationCleanerTest
                     PwmSetting.RECOVERY_MINIMUM_PASSWORD_LIFETIME_OPTIONS,
                     RecoveryMinLifetimeOption.class
             );
-            Assert.assertEquals( RecoveryMinLifetimeOption.NONE, minLifetimeOption );
+            Assertions.assertEquals( RecoveryMinLifetimeOption.NONE, minLifetimeOption );
         }
     }
 
@@ -118,7 +118,7 @@ public class ConfigurationCleanerTest
             final PwmPasswordPolicy pwmPasswordPolicy = domainConfig.getPasswordPolicy( profile );
             final ADPolicyComplexity adPolicyComplexity = pwmPasswordPolicy.getRuleHelper().getADComplexityLevel();
 
-            Assert.assertEquals( ADPolicyComplexity.AD2003, adPolicyComplexity );
+            Assertions.assertEquals( ADPolicyComplexity.AD2003, adPolicyComplexity );
         }
     }
 }

+ 9 - 9
server/src/test/java/password/pwm/config/stored/StoredConfigKeyTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config.stored;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.bean.ProfileID;
 import password.pwm.config.PwmSetting;
@@ -46,25 +46,25 @@ public class StoredConfigKeyTest
         {
             final StoredConfigKey key1 = StoredConfigKey.forSetting( PwmSetting.PWM_SITE_URL, null, domainID );
             final StoredConfigKey key2 = StoredConfigKey.forSetting( PwmSetting.PWM_SITE_URL, null, domainID );
-            Assert.assertEquals( key1, key2 );
+            Assertions.assertEquals( key1, key2 );
         }
         {
             final StoredConfigKey key1 = StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Application.getKey(), domainID );
             final StoredConfigKey key2 = StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Application.getKey(), domainID );
-            Assert.assertEquals( key1, key2 );
+            Assertions.assertEquals( key1, key2 );
         }
         {
             final StoredConfigKey key1 = StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Application.getKey(), domainID );
             final StoredConfigKey key2 = StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Admin.getKey(), domainID );
-            Assert.assertNotEquals( key1, key2 );
+            Assertions.assertNotEquals( key1, key2 );
         }
         {
             final Set<StoredConfigKey> set = new HashSet<>();
             set.add( StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Application.getKey(), domainID ) );
             set.add( StoredConfigKey.forLocaleBundle( PwmLocaleBundle.DISPLAY, Display.Title_Application.getKey(), domainID ) );
-            Assert.assertEquals( 1, set.size() );
+            Assertions.assertEquals( 1, set.size() );
             set.add( StoredConfigKey.forLocaleBundle( PwmLocaleBundle.CONFIG, Config.Display_AboutTemplates.getKey(), domainID ) );
-            Assert.assertEquals( 2, set.size() );
+            Assertions.assertEquals( 2, set.size() );
         }
     }
 
@@ -76,7 +76,7 @@ public class StoredConfigKeyTest
         set.add( StoredConfigKey.forSetting( PwmSetting.SECURITY_ENABLE_FORM_NONCE, null, DomainID.systemId() ) );
         set.add( StoredConfigKey.forSetting( PwmSetting.SECURITY_ENABLE_FORM_NONCE, null, DomainID.systemId() ) );
         set.add( StoredConfigKey.forSetting( PwmSetting.SETUP_RESPONSE_ENABLE, null, DomainID.systemId() ) );
-        Assert.assertEquals( 3, set.size() );
+        Assertions.assertEquals( 3, set.size() );
     }
 
 
@@ -108,7 +108,7 @@ public class StoredConfigKeyTest
         Collections.shuffle( list );
         list.sort( StoredConfigKey.comparator() );
         Collections.sort( profiles );
-        Assert.assertEquals(
+        Assertions.assertEquals(
                 StoredConfigKey.forSetting( PwmSetting.NOTES, null, DomainID.systemId() ),
                 list.stream().findFirst().orElseThrow() );
     }

+ 7 - 7
server/src/test/java/password/pwm/config/stored/StoredConfigurationModifierTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config.stored;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.bean.ProfileID;
 import password.pwm.config.PwmSetting;
@@ -50,7 +50,7 @@ public class StoredConfigurationModifierTest
         final StoredConfiguration newConfig = modifier.newStoredConfiguration();
 
         final String notesText = ValueTypeConverter.valueToString( newConfig.readStoredValue( key ).orElseThrow() );
-        Assert.assertEquals( "notes test", notesText );
+        Assertions.assertEquals( "notes test", notesText );
     }
 
     @Test
@@ -76,11 +76,11 @@ public class StoredConfigurationModifierTest
                 null );
 
         final List<ProfileID> profileNames = StoredConfigurationUtil.profilesForSetting( domainID, PwmSetting.HELPDESK_RESULT_LIMIT, postCopyConfig );
-        Assert.assertEquals( 2, profileNames.size() );
-        Assert.assertTrue( profileNames.contains( ProfileID.PROFILE_ID_DEFAULT ) );
-        Assert.assertTrue( profileNames.contains( newProfileID ) );
+        Assertions.assertEquals( 2, profileNames.size() );
+        Assertions.assertTrue( profileNames.contains( ProfileID.PROFILE_ID_DEFAULT ) );
+        Assertions.assertTrue( profileNames.contains( newProfileID ) );
 
         final long copiedResultLimit = ValueTypeConverter.valueToLong( postCopyConfig.readStoredValue( key ).orElseThrow() );
-        Assert.assertEquals( 19, copiedResultLimit );
+        Assertions.assertEquals( 19, copiedResultLimit );
     }
 }

+ 14 - 8
server/src/test/java/password/pwm/config/stored/StoredConfigurationTest.java

@@ -20,24 +20,27 @@
 
 package password.pwm.config.stored;
 
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.config.AppConfig;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.localdb.TestHelper;
 
+import java.io.File;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 public class StoredConfigurationTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     private static AppConfig appConfig;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception
     {
         try ( InputStream xmlFile = ConfigurationCleanerTest.class.getResourceAsStream( "ConfigurationCleanerTest.xml" ) )
@@ -51,7 +54,10 @@ public class StoredConfigurationTest
     public void configurationHashTest()
             throws Exception
     {
-        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder(), appConfig );
+        final File testFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-configurationHashTest" );
+        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( testFolder, appConfig );
         final String configHash = StoredConfigurationUtil.valueHash( appConfig.getStoredConfiguration() );
+
+        Assertions.assertTrue( !configHash.isEmpty() );
     }
 }

+ 7 - 7
server/src/test/java/password/pwm/config/stored/StoredConfigurationUtilTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.config.stored;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.PwmSettingScope;
@@ -50,16 +50,16 @@ public class StoredConfigurationUtilTest
         final StoredConfiguration newConfig = modifier.newStoredConfiguration();
 
         final Set<StoredConfigKey> modifiedKeys = StoredConfigurationUtil.changedValues( storedConfiguration, newConfig );
-        Assert.assertEquals( 1, modifiedKeys.size() );
-        Assert.assertEquals( modifiedKeys.iterator().next(), key );
+        Assertions.assertEquals( 1, modifiedKeys.size() );
+        Assertions.assertEquals( modifiedKeys.iterator().next(), key );
 
 
         final StoredConfigurationModifier modifier2 = StoredConfigurationModifier.newModifier( newConfig );
         modifier2.resetSetting( key, null );
         final StoredConfiguration resetConfig = modifier2.newStoredConfiguration();
         final Set<StoredConfigKey> resetKeys = StoredConfigurationUtil.changedValues( newConfig, resetConfig );
-        Assert.assertEquals( 1, resetKeys.size() );
-        Assert.assertEquals( resetKeys.iterator().next(), key );
+        Assertions.assertEquals( 1, resetKeys.size() );
+        Assertions.assertEquals( resetKeys.iterator().next(), key );
 
     }
 
@@ -91,6 +91,6 @@ public class StoredConfigurationUtilTest
                 .filter( key -> key.getDomainID().equals( DomainID.create( "target" ) ) )
                 .collect( Collectors.toList() );
 
-        Assert.assertEquals( stringSettingKeys.size(), destKeys.size() );
+        Assertions.assertEquals( stringSettingKeys.size(), destKeys.size() );
     }
 }

+ 37 - 37
server/src/test/java/password/pwm/config/value/ActionValueTest.java

@@ -25,8 +25,8 @@ import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
 import org.jrivard.xmlchai.XmlFactory;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.stored.XmlOutputProcessData;
 import password.pwm.config.value.data.ActionConfiguration;
@@ -53,32 +53,32 @@ public class ActionValueTest
         final ActionValue actionValue = ( ActionValue ) ActionValue.factory().fromXmlElement( PwmSetting.CHANGE_PASSWORD_WRITE_ATTRIBUTES, settingElement, null );
 
         final List<ActionConfiguration> actionConfigurations = actionValue.toNativeObject();
-        Assert.assertEquals( 1, actionConfigurations.size() );
+        Assertions.assertEquals( 1, actionConfigurations.size() );
 
         final ActionConfiguration action1 = actionConfigurations.get( 0 );
-        Assert.assertEquals( "action1", action1.getName() );
-        Assert.assertEquals( "description", action1.getDescription() );
-        Assert.assertEquals( 1, action1.getWebActions().size() );
-        Assert.assertEquals( 1, action1.getLdapActions().size() );
+        Assertions.assertEquals( "action1", action1.getName() );
+        Assertions.assertEquals( "description", action1.getDescription() );
+        Assertions.assertEquals( 1, action1.getWebActions().size() );
+        Assertions.assertEquals( 1, action1.getLdapActions().size() );
 
         final ActionConfiguration.WebAction webAction = action1.getWebActions().get( 0 );
-        Assert.assertEquals( ActionConfiguration.WebMethod.post, webAction.getMethod() );
-        Assert.assertEquals( 2, webAction.getHeaders().size() );
-        Assert.assertEquals( "v1", webAction.getHeaders().get( "h1" ) );
-        Assert.assertEquals( "v2", webAction.getHeaders().get( "h2" ) );
-        Assert.assertEquals( "username", webAction.getUsername() );
-        Assert.assertEquals( "password", webAction.getPassword() );
-        Assert.assertEquals( "https://www.example.com", webAction.getUrl() );
-        Assert.assertEquals( "BODY", webAction.getBody() );
-        Assert.assertEquals( getTestCerts(), webAction.getCertificates() );
-        Assert.assertEquals( 2, webAction.getSuccessStatus().size() );
-        Assert.assertTrue( webAction.getSuccessStatus().contains( 200 ) );
-        Assert.assertTrue( webAction.getSuccessStatus().contains( 201 ) );
+        Assertions.assertEquals( ActionConfiguration.WebMethod.post, webAction.getMethod() );
+        Assertions.assertEquals( 2, webAction.getHeaders().size() );
+        Assertions.assertEquals( "v1", webAction.getHeaders().get( "h1" ) );
+        Assertions.assertEquals( "v2", webAction.getHeaders().get( "h2" ) );
+        Assertions.assertEquals( "username", webAction.getUsername() );
+        Assertions.assertEquals( "password", webAction.getPassword() );
+        Assertions.assertEquals( "https://www.example.com", webAction.getUrl() );
+        Assertions.assertEquals( "BODY", webAction.getBody() );
+        Assertions.assertEquals( getTestCerts(), webAction.getCertificates() );
+        Assertions.assertEquals( 2, webAction.getSuccessStatus().size() );
+        Assertions.assertTrue( webAction.getSuccessStatus().contains( 200 ) );
+        Assertions.assertTrue( webAction.getSuccessStatus().contains( 201 ) );
 
         final ActionConfiguration.LdapAction ldapAction = action1.getLdapActions().get( 0 );
-        Assert.assertEquals( "ldapAttribute1", ldapAction.getAttributeName() );
-        Assert.assertEquals( "value1", ldapAction.getAttributeValue() );
-        Assert.assertEquals( ActionConfiguration.LdapMethod.remove, ldapAction.getLdapMethod() );
+        Assertions.assertEquals( "ldapAttribute1", ldapAction.getAttributeName() );
+        Assertions.assertEquals( "value1", ldapAction.getAttributeValue() );
+        Assertions.assertEquals( ActionConfiguration.LdapMethod.remove, ldapAction.getLdapMethod() );
     }
 
     @Test
@@ -122,7 +122,7 @@ public class ActionValueTest
         xmlDocument.getRootElement().attachElement( settingElement );
         final String xmlStringOutput = XmlChai.getFactory().outputString( xmlDocument, XmlFactory.OutputFlag.Compact );
 
-        Assert.assertEquals( xmlTestValue( "jsonDataFull" ), xmlStringOutput );
+        Assertions.assertEquals( xmlTestValue( "jsonDataFull" ), xmlStringOutput );
     }
 
     @Test
@@ -136,23 +136,23 @@ public class ActionValueTest
         final ActionValue actionValue = ( ActionValue ) ActionValue.factory().fromXmlElement( PwmSetting.CHANGE_PASSWORD_WRITE_ATTRIBUTES, settingElement, null );
 
         final List<ActionConfiguration> actionConfigurations = actionValue.toNativeObject();
-        Assert.assertEquals( 1, actionConfigurations.size() );
+        Assertions.assertEquals( 1, actionConfigurations.size() );
 
         final ActionConfiguration action1 = actionConfigurations.get( 0 );
-        Assert.assertEquals( "action1", action1.getName() );
-        Assert.assertNull(  action1.getDescription() );
-        Assert.assertEquals( 1, action1.getWebActions().size() );
-        Assert.assertEquals( 0, action1.getLdapActions().size() );
+        Assertions.assertEquals( "action1", action1.getName() );
+        Assertions.assertNull(  action1.getDescription() );
+        Assertions.assertEquals( 1, action1.getWebActions().size() );
+        Assertions.assertEquals( 0, action1.getLdapActions().size() );
 
         final ActionConfiguration.WebAction webAction = action1.getWebActions().get( 0 );
-        Assert.assertEquals( ActionConfiguration.WebMethod.get, webAction.getMethod() );
-        Assert.assertEquals( "", webAction.getUsername() );
-        Assert.assertEquals( "", webAction.getPassword() );
-        Assert.assertEquals( "https://www.example.com", webAction.getUrl() );
-        Assert.assertEquals( "", webAction.getBody() );
-        Assert.assertEquals( 0, webAction.getCertificates().size() );
-        Assert.assertEquals( 1, webAction.getSuccessStatus().size() );
-        Assert.assertTrue( webAction.getSuccessStatus().contains( 200 ) );
+        Assertions.assertEquals( ActionConfiguration.WebMethod.get, webAction.getMethod() );
+        Assertions.assertEquals( "", webAction.getUsername() );
+        Assertions.assertEquals( "", webAction.getPassword() );
+        Assertions.assertEquals( "https://www.example.com", webAction.getUrl() );
+        Assertions.assertEquals( "", webAction.getBody() );
+        Assertions.assertEquals( 0, webAction.getCertificates().size() );
+        Assertions.assertEquals( 1, webAction.getSuccessStatus().size() );
+        Assertions.assertTrue( webAction.getSuccessStatus().contains( 200 ) );
     }
 
     @Test
@@ -183,7 +183,7 @@ public class ActionValueTest
         xmlDocument.getRootElement().attachElement( settingElement );
         final String xmlStringOutput = XmlChai.getFactory().outputString( xmlDocument, XmlFactory.OutputFlag.Compact );
 
-        Assert.assertEquals( xmlTestValue( "jsonDataBasicWeb" ), xmlStringOutput );
+        Assertions.assertEquals( xmlTestValue( "jsonDataBasicWeb" ), xmlStringOutput );
     }
 
     private static Map<String, String> makeHeaderTestMap()

+ 7 - 7
server/src/test/java/password/pwm/config/value/FileValueTest.java

@@ -25,8 +25,8 @@ import org.jrivard.xmlchai.AccessMode;
 import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.stored.ConfigurationCleanerTest;
@@ -80,11 +80,11 @@ public class FileValueTest
                 fileContent = map.values().iterator().next();
             }
 
-            Assert.assertEquals( "filename", fileInformation.getFilename() );
-            Assert.assertEquals( "fileType", fileInformation.getFiletype() );
-            Assert.assertEquals( inputFile.length, fileContent.getContents().size() );
-            Assert.assertArrayEquals( inputFile, fileContent.getContents().copyOf() );
-            Assert.assertEquals( inputHash, fileContent.sha512sum() );
+            Assertions.assertEquals( "filename", fileInformation.getFilename() );
+            Assertions.assertEquals( "fileType", fileInformation.getFiletype() );
+            Assertions.assertEquals( inputFile.length, fileContent.getContents().size() );
+            Assertions.assertArrayEquals( inputFile, fileContent.getContents().copyOf() );
+            Assertions.assertEquals( inputHash, fileContent.sha512sum() );
         }
     }
 }

+ 1 - 1
server/src/test/java/password/pwm/error/PwmErrorTest.java

@@ -20,7 +20,7 @@
 
 package password.pwm.error;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 
 import java.util.HashSet;

+ 3 - 3
server/src/test/java/password/pwm/health/HealthMessageTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.health;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.AppConfig;
 import password.pwm.config.DomainConfig;
@@ -42,7 +42,7 @@ public class HealthMessageTest
         for ( final HealthMessage healthMessage : HealthMessage.values() )
         {
             // duplicate key found
-            Assert.assertFalse( seenKeys.contains( healthMessage.getKey() ) );
+            Assertions.assertFalse( seenKeys.contains( healthMessage.getKey() ) );
             seenKeys.add( healthMessage.getKey() );
         }
     }

+ 4 - 4
server/src/test/java/password/pwm/health/HealthStatusTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.health;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.EnumSet;
 import java.util.NoSuchElementException;
@@ -38,9 +38,9 @@ public class HealthStatusTest
         set.add( HealthStatus.CAUTION );
         set.add( HealthStatus.WARN );
         set.add( HealthStatus.CONFIG );
-        Assert.assertEquals( HealthStatus.WARN, HealthStatus.mostSevere( set ).orElseThrow( NoSuchElementException::new ) );
+        Assertions.assertEquals( HealthStatus.WARN, HealthStatus.mostSevere( set ).orElseThrow( NoSuchElementException::new ) );
 
         set.remove( HealthStatus.WARN );
-        Assert.assertEquals( HealthStatus.CAUTION, HealthStatus.mostSevere( set ).orElseThrow( NoSuchElementException::new ) );
+        Assertions.assertEquals( HealthStatus.CAUTION, HealthStatus.mostSevere( set ).orElseThrow( NoSuchElementException::new ) );
     }
 }

+ 3 - 3
server/src/test/java/password/pwm/http/HttpContentTypeTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.util.java.StringUtil;
 
 public class HttpContentTypeTest
@@ -33,7 +33,7 @@ public class HttpContentTypeTest
         for ( final HttpContentType httpContentType : HttpContentType.values() )
         {
             final String headerValue = httpContentType.getMimeType();
-            Assert.assertFalse( StringUtil.isEmpty( headerValue ) );
+            Assertions.assertFalse( StringUtil.isEmpty( headerValue ) );
         }
     }
 }

+ 14 - 14
server/src/test/java/password/pwm/http/PwmURLTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.config.AppConfig;
 import password.pwm.config.PwmSetting;
@@ -45,10 +45,10 @@ public class PwmURLTest
         final AppConfig appConfig = AppConfig.forStoredConfig( StoredConfigurationFactory.newConfig() );
         final PwmURL pwmURL = PwmURL.create( new URI( "https://wwww.example.com/pwm/private/login" ), "/pwm", appConfig );
 
-        Assert.assertEquals( PwmServletDefinition.Login, pwmURL.forServletDefinition().get() );
-        Assert.assertEquals( "/private/login", pwmURL.determinePwmServletPath() );
-        Assert.assertTrue( pwmURL.isPrivateUrl() );
-        Assert.assertTrue( pwmURL.matches( PwmServletDefinition.Login ) );
+        Assertions.assertEquals( PwmServletDefinition.Login, pwmURL.forServletDefinition().get() );
+        Assertions.assertEquals( "/private/login", pwmURL.determinePwmServletPath() );
+        Assertions.assertTrue( pwmURL.isPrivateUrl() );
+        Assertions.assertTrue( pwmURL.matches( PwmServletDefinition.Login ) );
 
     }
 
@@ -65,10 +65,10 @@ public class PwmURLTest
         }
         final PwmURL pwmURL = PwmURL.create( new URI( "https://wwww.example.com/pwm/aaaa/private/login" ), "/pwm", appConfig );
 
-        Assert.assertEquals( PwmServletDefinition.Login, pwmURL.forServletDefinition().get() );
-        Assert.assertEquals( "/private/login", pwmURL.determinePwmServletPath() );
-        Assert.assertTrue( pwmURL.isPrivateUrl() );
-        Assert.assertTrue( pwmURL.matches( PwmServletDefinition.Login ) );
+        Assertions.assertEquals( PwmServletDefinition.Login, pwmURL.forServletDefinition().get() );
+        Assertions.assertEquals( "/private/login", pwmURL.determinePwmServletPath() );
+        Assertions.assertTrue( pwmURL.isPrivateUrl() );
+        Assertions.assertTrue( pwmURL.matches( PwmServletDefinition.Login ) );
 
     }
 
@@ -79,8 +79,8 @@ public class PwmURLTest
         final AppConfig appConfig = AppConfig.forStoredConfig( StoredConfigurationFactory.newConfig() );
         final PwmURL pwmURL = PwmURL.create( new URI( "http://127.0.0.1:8080/pwm/public/resources/nonce-0/webjars/dojo/dojo.js" ), "/pwm", appConfig );
 
-        Assert.assertTrue( pwmURL.isPublicUrl() );
-        Assert.assertTrue( pwmURL.isResourceURL() );
+        Assertions.assertTrue( pwmURL.isPublicUrl() );
+        Assertions.assertTrue( pwmURL.isResourceURL() );
     }
 
     @Test
@@ -96,8 +96,8 @@ public class PwmURLTest
         }
         final PwmURL pwmURL = PwmURL.create( new URI( "http://127.0.0.1:8080/pwm/aaaa/public/resources/nonce-0/webjars/dojo/dojo.js" ), "/pwm", appConfig );
 
-        Assert.assertTrue( pwmURL.isPublicUrl() );
-        Assert.assertTrue( pwmURL.isResourceURL() );
+        Assertions.assertTrue( pwmURL.isPublicUrl() );
+        Assertions.assertTrue( pwmURL.isResourceURL() );
 
     }
 

+ 4 - 4
server/src/test/java/password/pwm/http/ServletTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.reflections.Reflections;
 import org.reflections.scanners.Scanners;
 import org.reflections.util.ClasspathHelper;
@@ -54,7 +54,7 @@ public class ServletTest
                 {
                     if ( StringUtil.caseIgnoreContains( seenServletNames, name ) )
                     {
-                        Assert.fail( httpServletClass.getName() + " servlet class name duplicate (case ignore) detected: " + name );
+                        Assertions.fail( httpServletClass.getName() + " servlet class name duplicate (case ignore) detected: " + name );
                     }
                     seenServletNames.add( name );
                 }
@@ -81,7 +81,7 @@ public class ServletTest
                     {
                         if ( seenPatterns.contains( name ) )
                         {
-                            Assert.fail( httpServletClass.getName() + " servlet pattern duplicate detected: " + name );
+                            Assertions.fail( httpServletClass.getName() + " servlet pattern duplicate detected: " + name );
                         }
                         seenPatterns.add( name );
                     }

+ 47 - 52
server/src/test/java/password/pwm/http/client/PwmHttpClientTest.java

@@ -20,14 +20,15 @@
 
 package password.pwm.http.client;
 
+import com.github.tomakehurst.wiremock.WireMockServer;
 import com.github.tomakehurst.wiremock.client.WireMock;
 import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
 import org.apache.http.entity.ContentType;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.AppProperty;
 import password.pwm.PwmApplication;
 import password.pwm.PwmConstants;
@@ -55,10 +56,10 @@ import password.pwm.util.secure.self.SelfCertFactory;
 import password.pwm.util.secure.self.SelfCertSettings;
 
 import java.io.File;
+import java.nio.file.Path;
 import java.security.KeyStore;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 public class PwmHttpClientTest
@@ -67,36 +68,21 @@ public class PwmHttpClientTest
     private static final String CERT_ALIAS = "wiremock";
     private static final String CERT_HOSTNAME = "localhost";
 
-    private X509Certificate httpsCertificate;
+    @TempDir
+    public Path temporaryFolder;
 
-    @Rule
-    public TemporaryFolder tempAppPath = new TemporaryFolder();
+    private WireMockServer wireMockRule;
 
-    @Rule
-    public WireMockRule wireMockRule = initWireMock();
+    private List<X509Certificate> httpsCertificates;
 
-
-    private WireMockRule initWireMock()
-    {
-        try
-        {
-            return initWireMockImpl();
-        }
-        catch ( final Exception e )
-        {
-            throw new IllegalStateException( e );
-        }
-    }
-
-    private WireMockRule initWireMockImpl()
+    @BeforeEach
+    void initWireMockImpl()
             throws Exception
     {
-        tempAppPath.create();
-
         final File httpsKeystoreFile = File.createTempFile(
                 "pwm-" + PwmHttpClientTest.class.getName() + "-",
                 ".jks",
-                tempAppPath.newFolder() );
+                temporaryFolder.toFile() );
 
         final KeyStore keyStore = SelfCertFactory.generateNewCert(
                 SelfCertSettings.builder().subjectAlternateName( CERT_HOSTNAME ).build(),
@@ -104,15 +90,24 @@ public class PwmHttpClientTest
                 new PasswordData( CERT_PASSWORD ),
                 CERT_ALIAS );
 
-        httpsCertificate = ( X509Certificate ) keyStore.getCertificate( CERT_ALIAS );
+        httpsCertificates = List.of( ( X509Certificate ) keyStore.getCertificate( CERT_ALIAS ) );
 
         X509Utils.outputKeystore( keyStore, httpsKeystoreFile, CERT_PASSWORD );
 
-        return new WireMockRule( WireMockConfiguration.wireMockConfig()
+        final WireMockConfiguration wireMockConfiguration = WireMockConfiguration.wireMockConfig()
                 .keystorePassword( CERT_PASSWORD )
                 .keystorePath( httpsKeystoreFile.getAbsolutePath() )
                 .dynamicPort()
-                .dynamicHttpsPort() );
+                .dynamicHttpsPort();
+
+        wireMockRule = new WireMockServer( wireMockConfiguration );
+        wireMockRule.start();
+    }
+
+    @AfterEach
+    void closeWireMock()
+    {
+        wireMockRule.stop();
     }
 
     /**
@@ -131,7 +126,7 @@ public class PwmHttpClientTest
         final String url = String.format( "http://localhost:%d/simpleHello", wireMockRule.port() );
 
         // Obtain the HTTP client
-        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( tempAppPath.newFolder(), makeAppConfig( url, false, false ) );
+        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( temporaryFolder.toFile(), makeAppConfig( url, false, false ) );
         final PwmHttpClient httpClient = pwmDomain.getHttpClientService().getPwmHttpClient( SessionLabel.TEST_SESSION_LABEL );
 
         // Execute the HTTP request
@@ -140,10 +135,10 @@ public class PwmHttpClientTest
 
         // Verify the response
         final int responseStatusCode = response.getStatusCode();
-        Assert.assertEquals( 200, responseStatusCode );
+        Assertions.assertEquals( 200, responseStatusCode );
 
         final String responseContent = response.getBody();
-        Assert.assertTrue( responseContent.startsWith( "PwmAbout" ) );
+        Assertions.assertTrue( responseContent.startsWith( "PwmAbout" ) );
 
         // Verify the HTTP server got called as expected
         wireMockRule.verify( WireMock.getRequestedFor( WireMock.urlEqualTo( "/simpleHello" ) )
@@ -153,7 +148,7 @@ public class PwmHttpClientTest
     /**
      * Test making an SSL request without setting SECURITY_HTTP_PROMISCUOUS_ENABLE to true, or supplying any certificates.
      */
-    @Test( expected = PwmUnrecoverableException.class )
+    @Test()
     public void testGetHttpClientSslHelloFail() throws Exception
     {
         // Stub out our local HTTP server
@@ -165,7 +160,7 @@ public class PwmHttpClientTest
         final String url = String.format( "https://localhost:%d/simpleHello", wireMockRule.httpsPort() );
 
         // Obtain the HTTP client
-        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( tempAppPath.newFolder(), makeAppConfig( null, false, false ) );
+        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( temporaryFolder.toFile(), makeAppConfig( null, false, false ) );
         final PwmHttpClient httpClient = pwmDomain.getHttpClientService().getPwmHttpClient( SessionLabel.TEST_SESSION_LABEL );
 
         // Execute the HTTP request
@@ -173,7 +168,10 @@ public class PwmHttpClientTest
 
 
         // This should throw an exception, since we're doing https without setting SECURITY_HTTP_PROMISCUOUS_ENABLE, or setting certificates
-        httpClient.makeRequest( pwmHttpClientRequest );
+        Assertions.assertThrows( PwmUnrecoverableException.class, () ->
+        {
+            httpClient.makeRequest( pwmHttpClientRequest );
+        } );
     }
 
     /**
@@ -191,7 +189,7 @@ public class PwmHttpClientTest
         final String url = String.format( "https://localhost:%d/simpleHello", wireMockRule.httpsPort() );
 
         // Obtain the HTTP client
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( tempAppPath.newFolder(), makeAppConfig( null, true, false ) );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.toFile(), makeAppConfig( null, true, false ) );
         final PwmHttpClient httpClient = pwmApplication.getHttpClientService().getPwmHttpClient(
                 PwmHttpClientConfiguration.builder().trustManagerType( PwmHttpClientConfiguration.TrustManagerType.promiscuous ).build(), SessionLabel.TEST_SESSION_LABEL
         );
@@ -201,10 +199,10 @@ public class PwmHttpClientTest
         final PwmHttpClientResponse response = httpClient.makeRequest( pwmHttpClientRequest );
 
         final int responseStatusCode = response.getStatusCode();
-        Assert.assertEquals( 200, responseStatusCode );
+        Assertions.assertEquals( 200, responseStatusCode );
 
         final String responseContent = response.getBody();
-        Assert.assertTrue( responseContent.startsWith( "PwmAbout" ) );
+        Assertions.assertTrue( responseContent.startsWith( "PwmAbout" ) );
     }
 
     /**
@@ -223,10 +221,10 @@ public class PwmHttpClientTest
 
 
         // Obtain the HTTP client
-        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( tempAppPath.newFolder(), makeAppConfig( null, false, true ) );
+        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( temporaryFolder.toFile(), makeAppConfig( null, false, true ) );
         final PwmHttpClient httpClient = pwmDomain.getHttpClientService().getPwmHttpClient(
                 PwmHttpClientConfiguration.builder().trustManagerType( PwmHttpClientConfiguration.TrustManagerType.configuredCertificates )
-                        .certificates( getWireMockSelfSignedCertificate() ).build(), SessionLabel.TEST_SESSION_LABEL
+                        .certificates( httpsCertificates ).build(), SessionLabel.TEST_SESSION_LABEL
         );
 
         // Execute the HTTP request
@@ -235,10 +233,10 @@ public class PwmHttpClientTest
 
         // Verify the response
         final int responseStatusCode = response.getStatusCode();
-        Assert.assertEquals( 200, responseStatusCode );
+        Assertions.assertEquals( 200, responseStatusCode );
 
         final String responseContent = response.getBody();
-        Assert.assertTrue( responseContent.startsWith( "PwmAbout" ) );
+        Assertions.assertTrue( responseContent.startsWith( "PwmAbout" ) );
     }
 
     /**
@@ -257,10 +255,10 @@ public class PwmHttpClientTest
         final String proxyUrl = String.format( "http://localhost:%d/simpleHello", wireMockRule.port() );
 
         // Obtain the HTTP client
-        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( tempAppPath.newFolder(), makeAppConfig( proxyUrl, false, false ) );
+        final PwmApplication pwmDomain = TestHelper.makeTestPwmApplication( temporaryFolder.toFile(), makeAppConfig( proxyUrl, false, false ) );
         final PwmHttpClient httpClient = pwmDomain.getHttpClientService().getPwmHttpClient(
                 PwmHttpClientConfiguration.builder().trustManagerType( PwmHttpClientConfiguration.TrustManagerType.configuredCertificates )
-                        .certificates( getWireMockSelfSignedCertificate() ).build(), SessionLabel.TEST_SESSION_LABEL
+                        .certificates( httpsCertificates ).build(), SessionLabel.TEST_SESSION_LABEL
         );
 
 
@@ -271,16 +269,13 @@ public class PwmHttpClientTest
 
         // Verify the response
         final int responseStatusCode = response.getStatusCode();
-        Assert.assertEquals( 200, responseStatusCode );
+        Assertions.assertEquals( 200, responseStatusCode );
 
         final String responseContent = response.getBody();
-        Assert.assertTrue( responseContent.startsWith( "PwmAbout" ) );
+        Assertions.assertTrue( responseContent.startsWith( "PwmAbout" ) );
     }
 
-    private List<X509Certificate> getWireMockSelfSignedCertificate()
-    {
-        return Collections.singletonList( this.httpsCertificate );
-    }
+
 
     private AppConfig makeAppConfig( final String proxyUrl, final boolean promiscuousEnable, final boolean disableHostnameVerification )
             throws PwmUnrecoverableException

+ 10 - 10
server/src/test/java/password/pwm/http/filter/RequestInitializationFilterTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http.filter;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import password.pwm.bean.DomainID;
 import password.pwm.config.AppConfig;
@@ -48,7 +48,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getRemoteAddr() ).thenReturn( "10.1.1.1" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.1", resultIP );
+        Assertions.assertEquals( "10.1.1.1", resultIP );
     }
 
     @Test
@@ -60,7 +60,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getRemoteAddr() ).thenReturn( "10.1.1.1m" );
 
         final Optional<String> resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf );
-        Assert.assertTrue( resultIP.isEmpty() );
+        Assertions.assertTrue( resultIP.isEmpty() );
     }
 
     @Test
@@ -73,7 +73,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.2", resultIP );
+        Assertions.assertEquals( "10.1.1.2", resultIP );
     }
 
     @Test
@@ -86,7 +86,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2a" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.1", resultIP );
+        Assertions.assertEquals( "10.1.1.1", resultIP );
     }
 
     @Test
@@ -99,7 +99,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2, 10.1.1.3" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.2", resultIP );
+        Assertions.assertEquals( "10.1.1.2", resultIP );
     }
 
     @Test
@@ -112,7 +112,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2a, 10.1.1.3" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.3", resultIP );
+        Assertions.assertEquals( "10.1.1.3", resultIP );
     }
 
     @Test
@@ -125,7 +125,7 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2a, 2001:0db8:85a3:0000:0000:8a2e:0370:7334" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "2001:0db8:85a3:0000:0000:8a2e:0370:7334", resultIP );
+        Assertions.assertEquals( "2001:0db8:85a3:0000:0000:8a2e:0370:7334", resultIP );
     }
 
     @Test
@@ -141,6 +141,6 @@ public class RequestInitializationFilterTest
         Mockito.when( mockRequest.getHeader( HttpHeader.XForwardedFor.getHttpName() ) ).thenReturn( "10.1.1.2" );
 
         final String resultIP = PwmRequestUtil.readUserNetworkAddress( mockRequest, conf ).orElseThrow();
-        Assert.assertEquals( "10.1.1.1", resultIP );
+        Assertions.assertEquals( "10.1.1.1", resultIP );
     }
 }

+ 10 - 10
server/src/test/java/password/pwm/http/servlet/ControlledPwmServletTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http.servlet;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.reflections.Reflections;
 import org.reflections.scanners.Scanners;
 import org.reflections.util.ClasspathHelper;
@@ -59,7 +59,7 @@ public class ControlledPwmServletTest
 
             if ( !processActionsClass.isEnum() )
             {
-                Assert.fail( controlledPwmServlet.getName() + " process action class must be an enum" );
+                Assertions.fail( controlledPwmServlet.getName() + " process action class must be an enum" );
             }
         }
     }
@@ -77,7 +77,7 @@ public class ControlledPwmServletTest
                 final Method method = dataMap.get( controlledPwmServlet ).get( methodName );
                 if ( !Modifier.isPublic( method.getModifiers() ) )
                 {
-                    Assert.fail( servletName + "#" + method.getName() + " must be public " );
+                    Assertions.fail( servletName + "#" + method.getName() + " must be public " );
                 }
             }
         }
@@ -96,7 +96,7 @@ public class ControlledPwmServletTest
                 final Method method = dataMap.get( controlledPwmServlet ).get( methodName );
                 if ( method.getReturnType() != ProcessStatus.class )
                 {
-                    Assert.fail( servletName + "#" + method.getName() + " must have return type of " + ProcessStatus.class.getName() );
+                    Assertions.fail( servletName + "#" + method.getName() + " must have return type of " + ProcessStatus.class.getName() );
                 }
             }
         }
@@ -116,11 +116,11 @@ public class ControlledPwmServletTest
                 final Class[] returnTypes = method.getParameterTypes();
                 if ( returnTypes.length != 1 )
                 {
-                    Assert.fail( servletName + "#" + method.getName() + " must have exactly one parameter" );
+                    Assertions.fail( servletName + "#" + method.getName() + " must have exactly one parameter" );
                 }
                 if ( !returnTypes[0].equals( PwmRequest.class ) )
                 {
-                    Assert.fail( servletName + "#" + method.getName() + " must have exactly one parameter of type " + PwmRequest.class.getName() );
+                    Assertions.fail( servletName + "#" + method.getName() + " must have exactly one parameter of type " + PwmRequest.class.getName() );
                 }
             }
         }
@@ -143,7 +143,7 @@ public class ControlledPwmServletTest
                     final String actionName = actionHandler.action();
                     if ( !methodName.toLowerCase().contains( actionName.toLowerCase() ) )
                     {
-                        Assert.fail( "method " + servletName + "#" + methodName + " must have the ActionHandler name '"
+                        Assertions.fail( "method " + servletName + "#" + methodName + " must have the ActionHandler name '"
                                 + actionName + "' as part of the method name." );
                     }
                 }
@@ -176,7 +176,7 @@ public class ControlledPwmServletTest
                 missingActionHandlers.removeAll( dataMap.get( controlledPwmServlet ).keySet() );
                 if ( !missingActionHandlers.isEmpty() )
                 {
-                    Assert.fail( servletName + " does not have an action handler for action " + missingActionHandlers.iterator().next() );
+                    Assertions.fail( servletName + " does not have an action handler for action " + missingActionHandlers.iterator().next() );
                 }
             }
 
@@ -185,7 +185,7 @@ public class ControlledPwmServletTest
                 superflousActionHandlers.removeAll( names );
                 if ( !superflousActionHandlers.isEmpty() )
                 {
-                    Assert.fail( servletName + " has an action handler for action " + superflousActionHandlers.iterator().next() + " but no such ProcessAction exists" );
+                    Assertions.fail( servletName + " has an action handler for action " + superflousActionHandlers.iterator().next() + " but no such ProcessAction exists" );
                 }
             }
         }

+ 6 - 6
server/src/test/java/password/pwm/http/servlet/oauth/OAuthMachineTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.http.servlet.oauth;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class OAuthMachineTest
 {
@@ -36,7 +36,7 @@ public class OAuthMachineTest
                 + "}";
         final OAuthSettings oAuthSettings = OAuthSettings.builder().build();
         final OAuthMachine oAuthMachine = new OAuthMachine( null, oAuthSettings );
-        Assert.assertEquals( "3599", oAuthMachine.readAttributeFromBodyMap( input, "expires_in" ) );
+        Assertions.assertEquals( "3599", oAuthMachine.readAttributeFromBodyMap( input, "expires_in" ) );
     }
 
     @Test
@@ -45,8 +45,8 @@ public class OAuthMachineTest
         final String input = "{\"sub\":\"0c8463c904e6444fa5c2b4597f816bc2\",\"claims\":[],\"email\":\"testadmin@example.com\"}";
         final OAuthSettings oAuthSettings = OAuthSettings.builder().build();
         final OAuthMachine oAuthMachine = new OAuthMachine( null, oAuthSettings );
-        Assert.assertEquals( "testadmin@example.com", oAuthMachine.readAttributeFromBodyMap( input, "email" ) );
-        Assert.assertNull( oAuthMachine.readAttributeFromBodyMap( input, "claims" ) );
+        Assertions.assertEquals( "testadmin@example.com", oAuthMachine.readAttributeFromBodyMap( input, "email" ) );
+        Assertions.assertNull( oAuthMachine.readAttributeFromBodyMap( input, "claims" ) );
     }
 
     @Test
@@ -55,6 +55,6 @@ public class OAuthMachineTest
         final String input = "{\"sub\":\"0c8463c904e6444fa5c2b4597f816bc2\",\"claims\":[\"value1\",\"value2\"],\"email\":\"testadmin@example.com\"}";
         final OAuthSettings oAuthSettings = OAuthSettings.builder().build();
         final OAuthMachine oAuthMachine = new OAuthMachine( null, oAuthSettings );
-        Assert.assertEquals( "value1", oAuthMachine.readAttributeFromBodyMap( input, "claims" ) );
+        Assertions.assertEquals( "value1", oAuthMachine.readAttributeFromBodyMap( input, "claims" ) );
     }
 }

+ 9 - 10
server/src/test/java/password/pwm/i18n/AdminPropertyKeysTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.i18n;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.svc.stats.AvgStatistic;
 import password.pwm.svc.stats.EpsStatistic;
@@ -61,9 +61,9 @@ public class AdminPropertyKeysTest
 
         for ( final String key : expectedKeys )
         {
-            Assert.assertTrue(
-                    "Admin.properties missing record for " + key,
-                    resourceBundle.containsKey( key ) );
+            Assertions.assertTrue(
+                    resourceBundle.containsKey( key ),
+                    "Admin.properties missing record for " + key );
         }
 
         final Set<String> extraKeys = new HashSet<>( resourceBundle.keySet() );
@@ -75,7 +75,7 @@ public class AdminPropertyKeysTest
                     || key.startsWith( password.pwm.i18n.Admin.STATISTICS_LABEL_PREFIX ) )
             {
 
-                Assert.fail( "unexpected key in Admin.properties file: " + key );
+                Assertions.fail( "unexpected key in Admin.properties file: " + key );
             }
         }
     }
@@ -92,9 +92,8 @@ public class AdminPropertyKeysTest
         {
             final String key = Admin.EPS_STATISTICS_LABEL_PREFIX + statistic.name();
             expectedKeys.add( key );
-            Assert.assertTrue(
-                    "Admin.properties missing record for " + key,
-                    resourceBundle.containsKey( key ) );
+            Assertions.assertTrue(
+                    resourceBundle.containsKey( key ),  "Admin.properties missing record for " + key );
         }
 
         final Set<String> extraKeys = new HashSet<>( resourceBundle.keySet() );
@@ -104,7 +103,7 @@ public class AdminPropertyKeysTest
         {
             if ( key.startsWith( password.pwm.i18n.Admin.EPS_STATISTICS_LABEL_PREFIX ) )
             {
-                Assert.fail( "unexpected key in Admin.properties file: " + key );
+                Assertions.fail( "unexpected key in Admin.properties file: " + key );
             }
         }
     }

+ 4 - 4
server/src/test/java/password/pwm/i18n/NonLocalizedKeyTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.i18n;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.AppConfig;
 import password.pwm.config.stored.StoredConfigurationFactory;
@@ -51,7 +51,7 @@ public class NonLocalizedKeyTest
             for ( final String key : NON_LOCALIZED_KEYS )
             {
                 final String value = resourceBundle.getString( key );
-                Assert.assertFalse( StringUtil.isEmpty( value ) );
+                Assertions.assertFalse( StringUtil.isEmpty( value ) );
             }
         }
 
@@ -76,7 +76,7 @@ public class NonLocalizedKeyTest
                             final String value = props.getProperty( key );
                             final String msg = "Display bundle for locale '" + locale.toLanguageTag() + "' has key '"
                                     + key + "'.  Only the default locale should have this key";
-                            Assert.assertTrue( msg, StringUtil.isEmpty( value ) );
+                            Assertions.assertTrue( StringUtil.isEmpty( value ), msg );
                         }
                     }
                 }

+ 20 - 17
server/src/test/java/password/pwm/svc/email/InternetAddressTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.svc.email;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import jakarta.mail.internet.AddressException;
 import jakarta.mail.internet.InternetAddress;
@@ -32,17 +32,20 @@ import jakarta.mail.internet.InternetAddress;
  */
 public class InternetAddressTest
 {
-    @Test( expected = Exception.class )
+    @Test
     public void testParseNull() throws AddressException
     {
-        InternetAddress.parse( null, true );
+        Assertions.assertThrows( Exception.class, () ->
+        {
+            InternetAddress.parse( null, true );
+        } );
     }
 
     @Test
     public void testParseEmpty() throws AddressException
     {
         final InternetAddress[] addresses = InternetAddress.parse( "", true );
-        Assert.assertEquals( 0, addresses.length );
+        Assertions.assertEquals( 0, addresses.length );
     }
 
     @Test
@@ -50,8 +53,8 @@ public class InternetAddressTest
     {
         final InternetAddress[] addresses = InternetAddress.parse( "fred@flintstones.tv" );
 
-        Assert.assertEquals( 1, addresses.length );
-        Assert.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
+        Assertions.assertEquals( 1, addresses.length );
+        Assertions.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
     }
 
     @Test
@@ -59,11 +62,11 @@ public class InternetAddressTest
     {
         final InternetAddress[] addresses = InternetAddress.parse( "fred@flintstones.tv,wilma@flinstones.tv, barney@flintstones.tv,   betty@flinstones.tv" );
 
-        Assert.assertEquals( 4, addresses.length );
-        Assert.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
-        Assert.assertEquals( "wilma@flinstones.tv", addresses[1].getAddress() );
-        Assert.assertEquals( "barney@flintstones.tv", addresses[2].getAddress() );
-        Assert.assertEquals( "betty@flinstones.tv", addresses[3].getAddress() );
+        Assertions.assertEquals( 4, addresses.length );
+        Assertions.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
+        Assertions.assertEquals( "wilma@flinstones.tv", addresses[1].getAddress() );
+        Assertions.assertEquals( "barney@flintstones.tv", addresses[2].getAddress() );
+        Assertions.assertEquals( "betty@flinstones.tv", addresses[3].getAddress() );
     }
 
     @Test
@@ -72,10 +75,10 @@ public class InternetAddressTest
         final InternetAddress[] addresses = InternetAddress.parse(
                 "fred@flintstones.tv,wilma@flinstones.tv, \"Rubble, Barney\"@flintstones.tv,   Betty Rubble <betty@flinstones.tv>" );
 
-        Assert.assertEquals( 4, addresses.length );
-        Assert.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
-        Assert.assertEquals( "wilma@flinstones.tv", addresses[1].getAddress() );
-        Assert.assertEquals( "\"Rubble, Barney\"@flintstones.tv", addresses[2].getAddress() );
-        Assert.assertEquals( "betty@flinstones.tv", addresses[3].getAddress() );
+        Assertions.assertEquals( 4, addresses.length );
+        Assertions.assertEquals( "fred@flintstones.tv", addresses[0].getAddress() );
+        Assertions.assertEquals( "wilma@flinstones.tv", addresses[1].getAddress() );
+        Assertions.assertEquals( "\"Rubble, Barney\"@flintstones.tv", addresses[2].getAddress() );
+        Assertions.assertEquals( "betty@flinstones.tv", addresses[3].getAddress() );
     }
 }

+ 4 - 4
server/src/test/java/password/pwm/svc/event/AuditEventTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.svc.event;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class AuditEventTest
 {
@@ -49,7 +49,7 @@ public class AuditEventTest
     {
         for ( final AuditEvent event : AuditEvent.values() )
         {
-            Assert.assertNotNull( event.getMessage() );
+            Assertions.assertNotNull( event.getMessage() );
         }
     }
 
@@ -58,7 +58,7 @@ public class AuditEventTest
     {
         for ( final AuditEvent event : AuditEvent.values() )
         {
-            Assert.assertNotNull( event.getNarrative() );
+            Assertions.assertNotNull( event.getNarrative() );
         }
     }
 }

+ 10 - 10
server/src/test/java/password/pwm/svc/event/CEFAuditFormatterTest.java

@@ -20,24 +20,24 @@
 
 package password.pwm.svc.event;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.PwmConstants;
 import password.pwm.util.json.JsonFactory;
 import password.pwm.util.localdb.TestHelper;
 
+import java.nio.file.Path;
 import java.util.Locale;
 
 public class CEFAuditFormatterTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception
     {
         Locale.setDefault( PwmConstants.DEFAULT_LOCALE );
@@ -64,8 +64,8 @@ public class CEFAuditFormatterTest
                 + " perpetratorID=per\\|son perpetratorDN=cn\\=per\\|son,o\\=org sourceAddress=2001:DB8:D:B8:35cc::/64 sourceHost=ws31222";
 
         final CEFAuditFormatter cefAuditFormatter = new CEFAuditFormatter();
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder() );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.toFile() );
         final String output = cefAuditFormatter.convertAuditRecordToMessage( pwmApplication, auditRecord );
-        Assert.assertEquals( expectedOutput, output );
+        Assertions.assertEquals( expectedOutput, output );
     }
 }

+ 9 - 8
server/src/test/java/password/pwm/svc/event/JsonAuditFormatterTest.java

@@ -20,19 +20,20 @@
 
 package password.pwm.svc.event;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.PwmConstants;
 import password.pwm.util.json.JsonFactory;
 import password.pwm.util.localdb.TestHelper;
 
+import java.nio.file.Path;
+
 public class JsonAuditFormatterTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     @Test
     public void testCEFFormatting() throws Exception
@@ -56,10 +57,10 @@ public class JsonAuditFormatterTest
         final String expectedOutput = PwmConstants.PWM_APP_NAME + " " + JsonFactory.get().serialize( auditRecord );
         final AuditFormatter auditFormatter = new JsonAuditFormatter();
 
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder() );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.toFile() );
 
         final String output = auditFormatter.convertAuditRecordToMessage( pwmApplication, auditRecord );
-        Assert.assertEquals( expectedOutput, output );
+        Assertions.assertEquals( expectedOutput, output );
     }
 
 }

+ 20 - 20
server/src/test/java/password/pwm/svc/event/LdapXmlUserHistoryTest.java

@@ -25,10 +25,9 @@ import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
 import org.jrivard.xmlchai.XmlFactory;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.PwmDomain;
 import password.pwm.bean.DomainID;
@@ -37,6 +36,7 @@ import password.pwm.svc.userhistory.LdapXmlUserHistory;
 import password.pwm.util.SampleDataGenerator;
 import password.pwm.util.localdb.TestHelper;
 
+import java.nio.file.Path;
 import java.time.Instant;
 import java.util.List;
 import java.util.Optional;
@@ -44,14 +44,14 @@ import java.util.ResourceBundle;
 
 public class LdapXmlUserHistoryTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     @Test
     public void inputParserTest()
             throws Exception
     {
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder() );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.toFile() );
         final PwmDomain pwmDomain = pwmApplication.domains().get( DomainID.DOMAIN_ID_DEFAULT );
         final ResourceBundle bundle = ResourceBundle.getBundle( LdapXmlUserHistoryTest.class.getName() );
         final String xmlValue1 =  bundle.getString( "xmlValue1" );
@@ -61,24 +61,24 @@ public class LdapXmlUserHistoryTest
                 AuditRecordFactory.make( SessionLabel.TEST_SESSION_LABEL,  pwmDomain ), SampleDataGenerator.sampleUserData() );
         //System.out.println( JsonUtil.serializeCollection( auditEventList, JsonUtil.Flag.PrettyPrint ) );
 
-        Assert.assertEquals( 20, auditEventList.size() );
-        Assert.assertEquals( 9, auditEventList.stream()
+        Assertions.assertEquals( 20, auditEventList.size() );
+        Assertions.assertEquals( 9, auditEventList.stream()
                 .filter( ( record ) -> record.getEventCode() == AuditEvent.CHANGE_PASSWORD ).count() );
 
         {
             final UserAuditRecord record0 = auditEventList.get( 0 );
-            Assert.assertEquals( "ort", record0.getSourceHost() );
-            Assert.assertEquals( "172.17.2.1", record0.getSourceAddress() );
-            Assert.assertEquals( Instant.parse( "2019-07-28T01:14:39.054Z" ), record0.getTimestamp() );
-            Assert.assertEquals( AuditEvent.CHANGE_PASSWORD, record0.getEventCode() );
+            Assertions.assertEquals( "ort", record0.getSourceHost() );
+            Assertions.assertEquals( "172.17.2.1", record0.getSourceAddress() );
+            Assertions.assertEquals( Instant.parse( "2019-07-28T01:14:39.054Z" ), record0.getTimestamp() );
+            Assertions.assertEquals( AuditEvent.CHANGE_PASSWORD, record0.getEventCode() );
         }
 
         {
             final UserAuditRecord record7 = auditEventList.get( 7 );
-            Assert.assertEquals( "0:0:0:0:0:0:0:1", record7.getSourceHost() );
-            Assert.assertEquals( "0:0:0:0:0:0:0:1", record7.getSourceAddress() );
-            Assert.assertEquals( Instant.parse( "2020-07-12T02:29:22.347Z" ), record7.getTimestamp() );
-            Assert.assertEquals( AuditEvent.AUTHENTICATE, record7.getEventCode() );
+            Assertions.assertEquals( "0:0:0:0:0:0:0:1", record7.getSourceHost() );
+            Assertions.assertEquals( "0:0:0:0:0:0:0:1", record7.getSourceAddress() );
+            Assertions.assertEquals( Instant.parse( "2020-07-12T02:29:22.347Z" ), record7.getTimestamp() );
+            Assertions.assertEquals( AuditEvent.AUTHENTICATE, record7.getEventCode() );
         }
 
 
@@ -99,11 +99,11 @@ public class LdapXmlUserHistoryTest
 
         final XmlDocument xmlDocument = xmlFactory.parseString( xmlValue, AccessMode.IMMUTABLE );
         final Optional<XmlElement> optionalRecordElement = xmlDocument.evaluateXpathToElement( "/history/record" );
-        Assert.assertTrue( optionalRecordElement.isPresent() );
+        Assertions.assertTrue( optionalRecordElement.isPresent() );
         optionalRecordElement.ifPresent( xmlElement ->
         {
-            Assert.assertEquals( "EventLog_ChangePassword", xmlElement.getAttribute( "eventCode" ).orElseThrow() );
-            Assert.assertEquals( "1582824390000", xmlElement.getAttribute( "timestamp" ).orElseThrow() );
+            Assertions.assertEquals( "EventLog_ChangePassword", xmlElement.getAttribute( "eventCode" ).orElseThrow() );
+            Assertions.assertEquals( "1582824390000", xmlElement.getAttribute( "timestamp" ).orElseThrow() );
         } );
     }
 }

+ 13 - 13
server/src/test/java/password/pwm/svc/sms/EmailQueueManagerTest.java

@@ -23,8 +23,8 @@ package password.pwm.svc.sms;
 import jakarta.mail.Message;
 import jakarta.mail.MessagingException;
 import jakarta.mail.internet.InternetAddress;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import password.pwm.AppProperty;
 import password.pwm.PwmConstants;
@@ -59,28 +59,28 @@ public class EmailQueueManagerTest
                 .build();
 
         final List<Message> messages = EmailServerUtil.convertEmailItemToMessages( emailItemBean, config, emailServer, SessionLabel.TEST_SESSION_LABEL );
-        Assert.assertEquals( 2, messages.size() );
+        Assertions.assertEquals( 2, messages.size() );
 
         {
             final Message message = messages.get( 0 );
-            Assert.assertEquals( new InternetAddress( "fred@flintstones.tv" ), message.getRecipients( Message.RecipientType.TO )[0] );
-            Assert.assertEquals( new InternetAddress( "bedrock-admin@flintstones.tv" ), message.getFrom()[0] );
-            Assert.assertEquals( "Test Subject", message.getSubject() );
+            Assertions.assertEquals( new InternetAddress( "fred@flintstones.tv" ), message.getRecipients( Message.RecipientType.TO )[0] );
+            Assertions.assertEquals( new InternetAddress( "bedrock-admin@flintstones.tv" ), message.getFrom()[0] );
+            Assertions.assertEquals( "Test Subject", message.getSubject() );
             final String content = JavaHelper.copyToString( message.getInputStream(), PwmConstants.DEFAULT_CHARSET, Integer.MAX_VALUE )
                     .orElse( "" );
-            Assert.assertTrue( content.contains( "bodyPlain" ) );
-            Assert.assertTrue( content.contains( "bodyHtml" ) );
+            Assertions.assertTrue( content.contains( "bodyPlain" ) );
+            Assertions.assertTrue( content.contains( "bodyHtml" ) );
         }
 
         {
             final Message message = messages.get( 1 );
-            Assert.assertEquals( new InternetAddress( "barney@flintstones.tv" ), message.getRecipients( Message.RecipientType.TO )[0] );
-            Assert.assertEquals( new InternetAddress( "bedrock-admin@flintstones.tv" ), message.getFrom()[0] );
-            Assert.assertEquals( "Test Subject", message.getSubject() );
+            Assertions.assertEquals( new InternetAddress( "barney@flintstones.tv" ), message.getRecipients( Message.RecipientType.TO )[0] );
+            Assertions.assertEquals( new InternetAddress( "bedrock-admin@flintstones.tv" ), message.getFrom()[0] );
+            Assertions.assertEquals( "Test Subject", message.getSubject() );
             final String content = JavaHelper.copyToString( message.getInputStream(), PwmConstants.DEFAULT_CHARSET, Integer.MAX_VALUE )
                     .orElse( "" );
-            Assert.assertTrue( content.contains( "bodyPlain" ) );
-            Assert.assertTrue( content.contains( "bodyHtml" ) );
+            Assertions.assertTrue( content.contains( "bodyPlain" ) );
+            Assertions.assertTrue( content.contains( "bodyHtml" ) );
         }
     }
 }

+ 13 - 13
server/src/test/java/password/pwm/svc/wordlist/WordTypeTest.java

@@ -20,28 +20,28 @@
 
 package password.pwm.svc.wordlist;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class WordTypeTest
 {
     @Test
     public void testDetermineWordTypes()
     {
-        Assert.assertEquals( WordType.RAW, WordType.determineWordType( "password" ) );
+        Assertions.assertEquals( WordType.RAW, WordType.determineWordType( "password" ) );
 
-        Assert.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:password" ) );
-        Assert.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD" ) );
-        Assert.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD80" ) );
+        Assertions.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:password" ) );
+        Assertions.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD" ) );
+        Assertions.assertEquals( WordType.RAW, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD80" ) );
 
-        Assert.assertEquals( WordType.SHA1, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" ) );
-        Assert.assertEquals( WordType.SHA1, WordType.determineWordType( "SHA1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" ) );
-        Assert.assertEquals( WordType.SHA1, WordType.determineWordType( "sha1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" ) );
-        Assert.assertEquals( WordType.SHA1, WordType.determineWordType( "SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" ) );
+        Assertions.assertEquals( WordType.SHA1, WordType.determineWordType( "sha1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" ) );
+        Assertions.assertEquals( WordType.SHA1, WordType.determineWordType( "SHA1:5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" ) );
+        Assertions.assertEquals( WordType.SHA1, WordType.determineWordType( "sha1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" ) );
+        Assertions.assertEquals( WordType.SHA1, WordType.determineWordType( "SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" ) );
 
-        Assert.assertEquals( WordType.MD5, WordType.determineWordType( "md5:5F4DCC3B5AA765D61D8327DEB882CF99" ) );
-        Assert.assertEquals( WordType.SHA256, WordType.determineWordType( "sha256:5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8" ) );
-        Assert.assertEquals( WordType.SHA512, WordType.determineWordType(
+        Assertions.assertEquals( WordType.MD5, WordType.determineWordType( "md5:5F4DCC3B5AA765D61D8327DEB882CF99" ) );
+        Assertions.assertEquals( WordType.SHA256, WordType.determineWordType( "sha256:5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8" ) );
+        Assertions.assertEquals( WordType.SHA512, WordType.determineWordType(
                 "sha512:B109F3BBBC244EB82441917ED06D618B9008DD09B3BEFD1B5E07394C706A8BB980B1D7785E5976EC049B46DF5F1326AF5A2EA6D103FD07C95385FFAB0CACBC86" ) );
     }
 }

+ 71 - 68
server/src/test/java/password/pwm/svc/wordlist/WordlistServiceTest.java

@@ -20,25 +20,27 @@
 
 package password.pwm.svc.wordlist;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import org.mockito.Mockito;
 import password.pwm.AppProperty;
 import password.pwm.PwmApplication;
 import password.pwm.config.AppConfig;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.stored.StoredConfigurationFactory;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.localdb.TestHelper;
 
+import java.io.File;
 import java.net.URL;
+import java.nio.file.Path;
 
 public class WordlistServiceTest
 {
 
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
     @Test
     public void testTypicalWordlist()
@@ -46,65 +48,65 @@ public class WordlistServiceTest
     {
         final WordlistService wordlistService = makeWordlistService( null );
 
-        Assert.assertTrue( wordlistService.containsWord( "password-test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "password-false-test" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "password-test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "password-false-test" ) );
 
-        Assert.assertFalse( wordlistService.containsWord( "0" ) );
-        Assert.assertFalse( wordlistService.containsWord( "01" ) );
-        Assert.assertFalse( wordlistService.containsWord( "012" ) );
-        Assert.assertFalse( wordlistService.containsWord( "0123" ) );
-        Assert.assertFalse( wordlistService.containsWord( "01234" ) );
-        Assert.assertFalse( wordlistService.containsWord( "012345" ) );
-        Assert.assertTrue( wordlistService.containsWord( "0123456" ) );
-        Assert.assertTrue( wordlistService.containsWord( "01234567" ) );
-        Assert.assertTrue( wordlistService.containsWord( "012345678" ) );
-        Assert.assertTrue( wordlistService.containsWord( "0123456789" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "0" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "01" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "012" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "0123" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "01234" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "012345" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "0123456" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "01234567" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "012345678" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "0123456789" ) );
 
-        Assert.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
-        Assert.assertTrue( wordlistService.containsWord( "AbcdefghijklmnopqrstuvwxyZ" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "AbcdefghijklmnopqrstuvwxyZ" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
 
         // make
-        Assert.assertTrue( wordlistService.containsWord( "md5-Password-Test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "md5-Password-Test-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "md5-Password-Test-Reverse" ) );
-        Assert.assertFalse( wordlistService.containsWord( "md5-Password-Test-Reverse-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha1-Password-Test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha1-Password-Test-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha1-Password-Test-Reverse" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha1-Password-Test-Reverse-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha256-Password-Test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha256-Password-Test-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha256-Password-Test-Reverse" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha256-Password-Test-Reverse-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha512-Password-Test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha512-Password-Test-false" ) );
-        Assert.assertTrue( wordlistService.containsWord( "sha512-Password-Test-Reverse" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha512-Password-Test-Reverse-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "md5-Password-Test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "md5-Password-Test-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "md5-Password-Test-Reverse" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "md5-Password-Test-Reverse-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha1-Password-Test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha1-Password-Test-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha1-Password-Test-Reverse" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha1-Password-Test-Reverse-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha256-Password-Test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha256-Password-Test-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha256-Password-Test-Reverse" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha256-Password-Test-Reverse-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha512-Password-Test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha512-Password-Test-false" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "sha512-Password-Test-Reverse" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha512-Password-Test-Reverse-false" ) );
 
         // make sure single line comment isn't imported as workd
-        Assert.assertFalse( wordlistService.containsWord( "!#comment!" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "!#comment!" ) );
 
         // make sure raw hashes aren't imported
-        Assert.assertFalse( wordlistService.containsWord( "6D3A08CFF825AA07DCEC94801D9B7647" ) );
-        Assert.assertFalse( wordlistService.containsWord( "BB231388547E063CCFFDD0282C37184A" ) );
-        Assert.assertFalse( wordlistService.containsWord( "4B0ABDCB3430D57D0581A9D617B8ABCD3202D992" ) );
-        Assert.assertFalse( wordlistService.containsWord( "056DA0B59D7C1622B8F60726DE8E25BC771D5E89" ) );
-        Assert.assertFalse( wordlistService.containsWord( "970FE1C94E532597BB8EF9BE7F397C7C8052127B6C21F443608322B3EF01176C" ) );
-        Assert.assertFalse( wordlistService.containsWord( "A96A0E4DB996D5A4B35558BDDB54BBF389FF853E349700F6FE9F96DD4441BD48" ) );
-        Assert.assertFalse( wordlistService.containsWord(
+        Assertions.assertFalse( wordlistService.containsWord( "6D3A08CFF825AA07DCEC94801D9B7647" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "BB231388547E063CCFFDD0282C37184A" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "4B0ABDCB3430D57D0581A9D617B8ABCD3202D992" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "056DA0B59D7C1622B8F60726DE8E25BC771D5E89" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "970FE1C94E532597BB8EF9BE7F397C7C8052127B6C21F443608322B3EF01176C" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "A96A0E4DB996D5A4B35558BDDB54BBF389FF853E349700F6FE9F96DD4441BD48" ) );
+        Assertions.assertFalse( wordlistService.containsWord(
                 "F910C640F9E720EE4E9D785101CED049B9C9A385D610E46BF8026FA9D3BC169637C0538A8361ADCB5C641079604F7C9CBAD6ED07F646D85DF83BB69E713739C4" ) );
-        Assert.assertFalse( wordlistService.containsWord(
+        Assertions.assertFalse( wordlistService.containsWord(
                 "3FA6580F55AA7F5337031895239E6C2B022A9A87A7FFC72041F8E080DC9F19CFA43EE862471829E9B556A4D9AF201476E508E6A312204641F604DFBE4240907F" ) );
-        Assert.assertFalse( wordlistService.containsWord( "md5:6D3A08CFF825AA07DCEC94801D9B7647" ) );
-        Assert.assertFalse( wordlistService.containsWord( "BB231388547E063CCFFDD0282C37184A:md5" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha1:4B0ABDCB3430D57D0581A9D617B8ABCD3202D992" ) );
-        Assert.assertFalse( wordlistService.containsWord( "056DA0B59D7C1622B8F60726DE8E25BC771D5E89:sha1" ) );
-        Assert.assertFalse( wordlistService.containsWord( "sha256:970FE1C94E532597BB8EF9BE7F397C7C8052127B6C21F443608322B3EF01176C" ) );
-        Assert.assertFalse( wordlistService.containsWord( "A96A0E4DB996D5A4B35558BDDB54BBF389FF853E349700F6FE9F96DD4441BD48:sha256" ) );
-        Assert.assertFalse( wordlistService.containsWord(
+        Assertions.assertFalse( wordlistService.containsWord( "md5:6D3A08CFF825AA07DCEC94801D9B7647" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "BB231388547E063CCFFDD0282C37184A:md5" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha1:4B0ABDCB3430D57D0581A9D617B8ABCD3202D992" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "056DA0B59D7C1622B8F60726DE8E25BC771D5E89:sha1" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "sha256:970FE1C94E532597BB8EF9BE7F397C7C8052127B6C21F443608322B3EF01176C" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "A96A0E4DB996D5A4B35558BDDB54BBF389FF853E349700F6FE9F96DD4441BD48:sha256" ) );
+        Assertions.assertFalse( wordlistService.containsWord(
                 "sha512:F910C640F9E720EE4E9D785101CED049B9C9A385D610E46BF8026FA9D3BC169637C0538A8361ADCB5C641079604F7C9CBAD6ED07F646D85DF83BB69E713739C4" ) );
-        Assert.assertFalse( wordlistService.containsWord(
+        Assertions.assertFalse( wordlistService.containsWord(
                 "3FA6580F55AA7F5337031895239E6C2B022A9A87A7FFC72041F8E080DC9F19CFA43EE862471829E9B556A4D9AF201476E508E6A312204641F604DFBE4240907F:Sha512" ) );
 
     }
@@ -117,12 +119,12 @@ public class WordlistServiceTest
         Mockito.when( appConfig.readSettingAsBoolean( PwmSetting.WORDLIST_CASE_SENSITIVE ) ).thenReturn( true );
         final WordlistService wordlistService = makeWordlistService( appConfig );
 
-        Assert.assertTrue( wordlistService.containsWord( "password-test" ) );
-        Assert.assertFalse( wordlistService.containsWord( "PASSWORD-TEST" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "password-test" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "PASSWORD-TEST" ) );
 
-        Assert.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
-        Assert.assertFalse( wordlistService.containsWord( "AbcdefghijklmnopqrstuvwxyZ" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "AbcdefghijklmnopqrstuvwxyZ" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
     }
 
     @Test
@@ -133,15 +135,15 @@ public class WordlistServiceTest
         Mockito.when( appConfig.readSettingAsLong( PwmSetting.PASSWORD_WORDLIST_WORDSIZE ) ).thenReturn( 4L );
         final WordlistService wordlistService = makeWordlistService( appConfig );
 
-        Assert.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "abcdefghijklmnopqrstuvwxyz" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
 
-        Assert.assertFalse( wordlistService.containsWord( "A" ) );
-        Assert.assertFalse( wordlistService.containsWord( "AB" ) );
-        Assert.assertFalse( wordlistService.containsWord( "ABC" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCD" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCDE" ) );
-        Assert.assertTrue( wordlistService.containsWord( "ABCde" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "A" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "AB" ) );
+        Assertions.assertFalse( wordlistService.containsWord( "ABC" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCD" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCDE" ) );
+        Assertions.assertTrue( wordlistService.containsWord( "ABCde" ) );
     }
 
     private WordlistService makeWordlistService( final AppConfig inputDomainConfig )
@@ -157,7 +159,8 @@ public class WordlistServiceTest
         final URL url = this.getClass().getResource( "test-wordlist.zip" );
         Mockito.when( appConfig.readAppProperty( AppProperty.WORDLIST_BUILTIN_PATH ) ).thenReturn( url.toString() );
 
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder(), appConfig );
+        final File testFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-makeWordlistService" );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( testFolder, appConfig );
         return pwmApplication.getWordlistService();
     }
 }

+ 4 - 4
server/src/test/java/password/pwm/svc/wordlist/WordlistUtilTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.svc.wordlist;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -36,7 +36,7 @@ public class WordlistUtilTest
         final String input = "zoogam";
         final Set<String> expectedOutput = new HashSet<>( Arrays.asList( "zoo", "oog", "gam", "oga", "gam" ) );
         final Set<String> output = WordlistUtil.chunkWord( input, 3 );
-        Assert.assertEquals( expectedOutput, output );
+        Assertions.assertEquals( expectedOutput, output );
     }
 
     @Test
@@ -45,6 +45,6 @@ public class WordlistUtilTest
         final String input = "zoogam";
         final Set<String> expectedOutput = new HashSet<>( Collections.singletonList( "zoogam" ) );
         final Set<String> output = WordlistUtil.chunkWord( input, 0 );
-        Assert.assertEquals( expectedOutput, output );
+        Assertions.assertEquals( expectedOutput, output );
     }
 }

+ 4 - 4
server/src/test/java/password/pwm/tests/PwmPasswordJudgeTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.tests;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.bean.DomainID;
 import password.pwm.config.AppConfig;
 import password.pwm.config.DomainConfig;
@@ -58,8 +58,8 @@ public class PwmPasswordJudgeTest
     {
         final DomainConfig domainConfig = makeConfig();
 
-        Assert.assertEquals( 0, PasswordUtility.judgePasswordStrength( domainConfig, "" ) );
-        Assert.assertEquals( 100, PasswordUtility.judgePasswordStrength( domainConfig,
+        Assertions.assertEquals( 0, PasswordUtility.judgePasswordStrength( domainConfig, "" ) );
+        Assertions.assertEquals( 100, PasswordUtility.judgePasswordStrength( domainConfig,
                 "V.{a$f.*B697e+%J9pOPn~E0CyqN~9XmR?yjOGFC(k+la?n6&^I3bwZq[miF(`0" ) );
 
         final List<Integer> judgeValues = new ArrayList<>();

+ 3 - 3
server/src/test/java/password/pwm/util/LDAPPermissionCalculatorTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.config.AppConfig;
 import password.pwm.config.DomainConfig;
 import password.pwm.config.stored.StoredConfiguration;
@@ -41,6 +41,6 @@ public class LDAPPermissionCalculatorTest
         final DomainConfig domainConfig = AppConfig.forStoredConfig( defaultConfig ).getDomainConfigs().values().stream().findFirst().orElseThrow();
         final LdapPermissionCalculator ldapPermissionCalculator = new LdapPermissionCalculator( domainConfig );
         final List<LdapPermissionCalculator.PermissionRecord> records = ldapPermissionCalculator.getPermissionRecords();
-        Assert.assertFalse( records.isEmpty() );
+        Assertions.assertFalse( records.isEmpty() );
     }
 }

+ 10 - 10
server/src/test/java/password/pwm/util/i18n/LocaleComparatorTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.i18n;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -39,17 +39,17 @@ public class LocaleComparatorTest
 
         list.sort( LocaleComparators.stringLocaleComparator() );
 
-        Assert.assertEquals( "br", list.get( 0 ) );
-        Assert.assertEquals( "en", list.get( 1 ) );
-        Assert.assertEquals( "fr", list.get( 2 ) );
-        Assert.assertEquals( "ja", list.get( 3 ) );
+        Assertions.assertEquals( "br", list.get( 0 ) );
+        Assertions.assertEquals( "en", list.get( 1 ) );
+        Assertions.assertEquals( "fr", list.get( 2 ) );
+        Assertions.assertEquals( "ja", list.get( 3 ) );
 
         list.sort( LocaleComparators.stringLocaleComparator( LocaleComparators.Flag.DefaultFirst ) );
 
         // default (english) first
-        Assert.assertEquals( "en", list.get( 0 ) );
-        Assert.assertEquals( "br", list.get( 1 ) );
-        Assert.assertEquals( "fr", list.get( 2 ) );
-        Assert.assertEquals( "ja", list.get( 3 ) );
+        Assertions.assertEquals( "en", list.get( 0 ) );
+        Assertions.assertEquals( "br", list.get( 1 ) );
+        Assertions.assertEquals( "fr", list.get( 2 ) );
+        Assertions.assertEquals( "ja", list.get( 3 ) );
     }
 }

+ 4 - 4
server/src/test/java/password/pwm/util/java/PwmDateFormatTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.text.ParseException;
 import java.time.Instant;
@@ -32,13 +32,13 @@ public class PwmDateFormatTest
     public void testDateFormat() throws ParseException
     {
         final PwmDateFormat pwmDateFormat = MiscUtil.newPwmDateFormat( "yyyyMMddhhmmss" );
-        Assert.assertEquals( "19700101120000", pwmDateFormat.format( Instant.ofEpochMilli( 0 ) ) );
+        Assertions.assertEquals( "19700101120000", pwmDateFormat.format( Instant.ofEpochMilli( 0 ) ) );
     }
 
     @Test
     public void testDateParse() throws ParseException
     {
         final PwmDateFormat pwmDateFormat = MiscUtil.newPwmDateFormat( "yyyyMMddhhmmss" );
-        Assert.assertEquals( Instant.ofEpochMilli( 0 ), pwmDateFormat.parse( "19700101120000" ) );
+        Assertions.assertEquals( Instant.ofEpochMilli( 0 ), pwmDateFormat.parse( "19700101120000" ) );
     }
 }

+ 28 - 28
server/src/test/java/password/pwm/util/java/TimeDurationTest.java

@@ -21,46 +21,46 @@
 
 package password.pwm.util.java;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class TimeDurationTest
 {
     @Test
     public void testConversions()
     {
-        Assert.assertEquals( 1000, TimeDuration.SECOND.asMillis() );
-        Assert.assertEquals( 10 * 1000, TimeDuration.SECONDS_10.asMillis() );
-        Assert.assertEquals( 30 * 1000, TimeDuration.SECONDS_30.asMillis() );
-        Assert.assertEquals( 60 * 1000, TimeDuration.MINUTE.asMillis() );
-        Assert.assertEquals( 60 * 60 * 1000, TimeDuration.HOUR.asMillis() );
-        Assert.assertEquals( 24 * 60 * 60 * 1000, TimeDuration.DAY.asMillis() );
+        Assertions.assertEquals( 1000, TimeDuration.SECOND.asMillis() );
+        Assertions.assertEquals( 10 * 1000, TimeDuration.SECONDS_10.asMillis() );
+        Assertions.assertEquals( 30 * 1000, TimeDuration.SECONDS_30.asMillis() );
+        Assertions.assertEquals( 60 * 1000, TimeDuration.MINUTE.asMillis() );
+        Assertions.assertEquals( 60 * 60 * 1000, TimeDuration.HOUR.asMillis() );
+        Assertions.assertEquals( 24 * 60 * 60 * 1000, TimeDuration.DAY.asMillis() );
 
         final TimeDuration timeDuration15m = TimeDuration.of( 15, TimeDuration.Unit.MINUTES );
         final TimeDuration timeDuration37h = TimeDuration.of( 37, TimeDuration.Unit.HOURS );
 
-        Assert.assertEquals( 15 * 60 * 1000, timeDuration15m.asMillis() );
-        Assert.assertEquals( 15 * 60 * 1000, timeDuration15m.as( TimeDuration.Unit.MILLISECONDS ) );
-        Assert.assertEquals( 15 * 60, timeDuration15m.as( TimeDuration.Unit.SECONDS ) );
-        Assert.assertEquals( 15, timeDuration15m.as( TimeDuration.Unit.MINUTES ) );
-        Assert.assertEquals( 0, timeDuration15m.as( TimeDuration.Unit.HOURS ) );
-        Assert.assertEquals( 0, timeDuration15m.as( TimeDuration.Unit.DAYS ) );
+        Assertions.assertEquals( 15 * 60 * 1000, timeDuration15m.asMillis() );
+        Assertions.assertEquals( 15 * 60 * 1000, timeDuration15m.as( TimeDuration.Unit.MILLISECONDS ) );
+        Assertions.assertEquals( 15 * 60, timeDuration15m.as( TimeDuration.Unit.SECONDS ) );
+        Assertions.assertEquals( 15, timeDuration15m.as( TimeDuration.Unit.MINUTES ) );
+        Assertions.assertEquals( 0, timeDuration15m.as( TimeDuration.Unit.HOURS ) );
+        Assertions.assertEquals( 0, timeDuration15m.as( TimeDuration.Unit.DAYS ) );
 
-        Assert.assertTrue( timeDuration37h.isLongerThan( timeDuration15m ) );
-        Assert.assertFalse( timeDuration37h.isShorterThan( timeDuration15m ) );
-        Assert.assertFalse( timeDuration15m.isLongerThan( timeDuration37h ) );
-        Assert.assertEquals( timeDuration15m, timeDuration15m );
-        Assert.assertNotEquals( timeDuration15m, timeDuration37h );
+        Assertions.assertTrue( timeDuration37h.isLongerThan( timeDuration15m ) );
+        Assertions.assertFalse( timeDuration37h.isShorterThan( timeDuration15m ) );
+        Assertions.assertFalse( timeDuration15m.isLongerThan( timeDuration37h ) );
+        Assertions.assertEquals( timeDuration15m, timeDuration15m );
+        Assertions.assertNotEquals( timeDuration15m, timeDuration37h );
 
-        Assert.assertEquals( TimeDuration.MILLISECONDS_2, TimeDuration.MILLISECOND.add( TimeDuration.MILLISECOND ) );
-        Assert.assertEquals( TimeDuration.MILLISECOND, TimeDuration.MILLISECONDS_2.subtract( TimeDuration.MILLISECOND ) );
+        Assertions.assertEquals( TimeDuration.MILLISECONDS_2, TimeDuration.MILLISECOND.add( TimeDuration.MILLISECOND ) );
+        Assertions.assertEquals( TimeDuration.MILLISECOND, TimeDuration.MILLISECONDS_2.subtract( TimeDuration.MILLISECOND ) );
 
-        Assert.assertEquals( TimeDuration.MILLISECOND, TimeDuration.MILLISECOND );
-        Assert.assertEquals( TimeDuration.SECOND, TimeDuration.SECOND );
-        Assert.assertEquals( TimeDuration.SECONDS_10, TimeDuration.SECONDS_10 );
-        Assert.assertEquals( TimeDuration.SECONDS_30, TimeDuration.SECONDS_30 );
-        Assert.assertEquals( TimeDuration.MINUTE, TimeDuration.MINUTE );
-        Assert.assertEquals( TimeDuration.HOUR, TimeDuration.HOUR );
-        Assert.assertEquals( TimeDuration.DAY, TimeDuration.DAY );
+        Assertions.assertEquals( TimeDuration.MILLISECOND, TimeDuration.MILLISECOND );
+        Assertions.assertEquals( TimeDuration.SECOND, TimeDuration.SECOND );
+        Assertions.assertEquals( TimeDuration.SECONDS_10, TimeDuration.SECONDS_10 );
+        Assertions.assertEquals( TimeDuration.SECONDS_30, TimeDuration.SECONDS_30 );
+        Assertions.assertEquals( TimeDuration.MINUTE, TimeDuration.MINUTE );
+        Assertions.assertEquals( TimeDuration.HOUR, TimeDuration.HOUR );
+        Assertions.assertEquals( TimeDuration.DAY, TimeDuration.DAY );
     }
 }

+ 1 - 1
server/src/test/java/password/pwm/util/java/XmlFactoryBenchmarkExtendedTest.java

@@ -24,7 +24,7 @@ import org.jrivard.xmlchai.AccessMode;
 import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlFactory;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.Mode;
 import org.openjdk.jmh.runner.Runner;

+ 6 - 6
server/src/test/java/password/pwm/util/java/XmlFactoryTest.java

@@ -24,8 +24,8 @@ import org.jrivard.xmlchai.AccessMode;
 import org.jrivard.xmlchai.XmlChai;
 import org.jrivard.xmlchai.XmlDocument;
 import org.jrivard.xmlchai.XmlElement;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 import java.io.InputStream;
 import java.util.List;
@@ -39,11 +39,11 @@ public class XmlFactoryTest
     {
         final InputStream xmlFactoryTestXmlFile = this.getClass().getResourceAsStream( "XmlFactoryTest.xml" );
         final XmlDocument xmlDocument = XmlChai.getFactory().parse( xmlFactoryTestXmlFile, AccessMode.IMMUTABLE );
-        Assert.assertEquals( "PwmConfiguration", xmlDocument.getRootElement().getName() );
+        Assertions.assertEquals( "PwmConfiguration", xmlDocument.getRootElement().getName() );
         final Optional<XmlElement> configIsEditable = xmlDocument.evaluateXpathToElement( "//property[@key='configIsEditable']" );
-        Assert.assertTrue( configIsEditable.isPresent() );
-        Assert.assertEquals( "false", configIsEditable.get().getText().orElseThrow() );
+        Assertions.assertTrue( configIsEditable.isPresent() );
+        Assertions.assertEquals( "false", configIsEditable.get().getText().orElseThrow() );
         final List<XmlElement> allSettings = xmlDocument.evaluateXpathToElements( "//setting" );
-        Assert.assertEquals( 279, allSettings.size() );
+        Assertions.assertEquals( 279, allSettings.size() );
     }
 }

+ 90 - 86
server/src/test/java/password/pwm/util/json/JsonProviderTest.java

@@ -20,10 +20,10 @@
 
 package password.pwm.util.json;
 
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
 import password.pwm.bean.DomainID;
 import password.pwm.bean.SessionLabel;
 import password.pwm.config.stored.StoredConfigurationFactory;
@@ -48,7 +48,6 @@ import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 import java.time.Instant;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -56,98 +55,94 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.concurrent.atomic.LongAdder;
+import java.util.stream.Stream;
 
-@RunWith( value = Parameterized.class )
 public class JsonProviderTest
 {
-    private final JsonProvider instance;
-
-    public JsonProviderTest( final JsonProvider instance )
+    static Stream<Arguments> jsonProviders()
     {
-        this.instance = instance;
+        return Stream.of(
+                Arguments.of( JsonFactory.get( JsonFactory.JsonImpl.moshi ) ),
+                Arguments.of( JsonFactory.get( JsonFactory.JsonImpl.gson ) ) );
     }
 
-    @Parameterized.Parameters
-    public static Collection<JsonProvider> data()
-    {
-        return List.of(
-                JsonFactory.get( JsonFactory.JsonImpl.moshi ),
-                JsonFactory.get( JsonFactory.JsonImpl.gson ) );
-    }
-
-    @Test
-    public void deserializeStringListTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeStringListTest( final JsonProvider instance )
     {
         final String jsonValue = "[\"value1\",\"value2\",\"value3\"]";
         final List<String> list = instance.deserializeStringList( jsonValue );
 
-        Assert.assertNotNull( list );
-        Assert.assertEquals( 3, list.size() );
-        Assert.assertEquals( "value1", list.get( 0 ) );
-        Assert.assertEquals( "value2", list.get( 1 ) );
-        Assert.assertEquals( "value3", list.get( 2 ) );
+        Assertions.assertNotNull( list );
+        Assertions.assertEquals( 3, list.size() );
+        Assertions.assertEquals( "value1", list.get( 0 ) );
+        Assertions.assertEquals( "value2", list.get( 1 ) );
+        Assertions.assertEquals( "value3", list.get( 2 ) );
 
         // verify returned collection is immutable
-        Assert.assertThrows( UnsupportedOperationException.class, () -> list.add( "new value" ) );
+        Assertions.assertThrows( UnsupportedOperationException.class, () -> list.add( "new value" ) );
     }
 
-    @Test
-    public void deserializeStringMapTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeStringMapTest( final JsonProvider instance )
     {
         final String jsonValue = "{\"key1\":\"value1\",\"key2\":\"value2\",\"key3\":\"value3\"}";
         final Map<String, String> map = instance.deserializeStringMap( jsonValue );
 
-        Assert.assertNotNull( map );
-        Assert.assertEquals( 3, map.size() );
-        Assert.assertEquals( "value1", map.get( "key1" ) );
-        Assert.assertEquals( "value2", map.get( "key2" ) );
-        Assert.assertEquals( "value3", map.get( "key3" ) );
+        Assertions.assertNotNull( map );
+        Assertions.assertEquals( 3, map.size() );
+        Assertions.assertEquals( "value1", map.get( "key1" ) );
+        Assertions.assertEquals( "value2", map.get( "key2" ) );
+        Assertions.assertEquals( "value3", map.get( "key3" ) );
 
         // verify returned collection is immutable
-        Assert.assertThrows( UnsupportedOperationException.class, () -> map.put( "new key", "new value" ) );
+        Assertions.assertThrows( UnsupportedOperationException.class, () -> map.put( "new key", "new value" ) );
     }
 
-    @Test
-    public void deserializeMapTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeMapTest( final JsonProvider instance )
     {
         final String jsonValue = "{\"key1\":\"value1\",\"key2\":\"value2\",\"key3\":\"value3\"}";
         final Map<String, Object> map = instance.deserializeMap( jsonValue, String.class, Object.class );
 
-        Assert.assertNotNull( map );
-        Assert.assertEquals( 3, map.size() );
-        Assert.assertEquals( "value1", map.get( "key1" ) );
-        Assert.assertEquals( "value2", map.get( "key2" ) );
-        Assert.assertEquals( "value3", map.get( "key3" ) );
+        Assertions.assertNotNull( map );
+        Assertions.assertEquals( 3, map.size() );
+        Assertions.assertEquals( "value1", map.get( "key1" ) );
+        Assertions.assertEquals( "value2", map.get( "key2" ) );
+        Assertions.assertEquals( "value3", map.get( "key3" ) );
 
         // verify returned collection is immutable
-        Assert.assertThrows( UnsupportedOperationException.class, () -> map.put( "new key", "new value" ) );
+        Assertions.assertThrows( UnsupportedOperationException.class, () -> map.put( "new key", "new value" ) );
     }
 
-    @Test
-    public void deserializeObjectTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeObjectTest( final JsonProvider instance )
     {
         final String jsonValue = TestObject1.makeExpectedJsonValue( instance );
         final TestObject1 testObject1 = instance.deserialize( jsonValue, TestObject1.class );
 
-        Assert.assertNotNull( testObject1 );
-        Assert.assertEquals( TestObject1.VALUE_STRING1, testObject1.getString1() );
-        Assert.assertEquals( TestObject1.VALUE_INSTANT1.toString(), testObject1.getInstant1().toString() );
-        Assert.assertEquals( TestObject1.VALUE_DATE1.toInstant().toString(), testObject1.getDate1().toInstant().toString() );
-        Assert.assertEquals( TestObject1.VALUE_LONG_ADDER1.longValue(), testObject1.getLongAdder1().longValue() );
-        Assert.assertEquals( TestObject1.VALUE_DOMAINID1, testObject1.getDomainId1() );
-        Assert.assertEquals( TestObject1.VALUE_PASSWORD_DATA1, testObject1.getPasswordData1() );
-        Assert.assertEquals( TestObject1.VALUE_X509_CERT1, testObject1.getCertificate1() );
-
+        Assertions.assertNotNull( testObject1 );
+        Assertions.assertEquals( TestObject1.VALUE_STRING1, testObject1.getString1() );
+        Assertions.assertEquals( TestObject1.VALUE_INSTANT1.toString(), testObject1.getInstant1().toString() );
+        Assertions.assertEquals( TestObject1.VALUE_DATE1.toInstant().toString(), testObject1.getDate1().toInstant().toString() );
+        Assertions.assertEquals( TestObject1.VALUE_LONG_ADDER1.longValue(), testObject1.getLongAdder1().longValue() );
+        Assertions.assertEquals( TestObject1.VALUE_DOMAINID1, testObject1.getDomainId1() );
+        Assertions.assertEquals( TestObject1.VALUE_PASSWORD_DATA1, testObject1.getPasswordData1() );
+        Assertions.assertEquals( TestObject1.VALUE_X509_CERT1, testObject1.getCertificate1() );
     }
 
-    @Test
-    public void miscSerializationTests()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void miscSerializationTests( final JsonProvider instance )
     {
         {
             final String json = "[{\"type\":\"ldapQuery\",\"ldapProfileID\":\"all\",\"ldapQuery\":\"(cn=asmith)\"}]";
             final List<UserPermission> userPermission = instance.deserializeList( json, UserPermission.class );
 
-            Assert.assertEquals( UserPermissionType.ldapQuery, userPermission.get( 0 ).getType() );
+            Assertions.assertEquals( UserPermissionType.ldapQuery, userPermission.get( 0 ).getType() );
         }
 
         {
@@ -158,20 +153,22 @@ public class JsonProviderTest
             );
 
             final String json = instance.serializeMap( new TreeMap<>( map ), String.class, Integer.class );
-            Assert.assertEquals( "{\"J\":1,\"JJ\":2,\"JJJ\":3}", json );
+            Assertions.assertEquals( "{\"J\":1,\"JJ\":2,\"JJJ\":3}", json );
         }
     }
 
-    @Test
-    public void serializeNestedListMap()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void serializeNestedListMap( final JsonProvider instance )
     {
         final List<Map<String, Object>> srcObject = new ArrayList<>();
         srcObject.add( Map.of( "key1", "value1" ) );
         final String jsonOutput = instance.serializeCollection( srcObject );
-        Assert.assertEquals( "[{\"key1\":\"value1\"}]", jsonOutput );
+        Assertions.assertEquals( "[{\"key1\":\"value1\"}]", jsonOutput );
     }
 
-    @Test
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
     public void deserializeNestedListMap()
     {
 
@@ -180,19 +177,21 @@ public class JsonProviderTest
 
     }
 
-    @Test
-    public void deserializeCollectionTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeCollectionTest( final JsonProvider instance )
     {
         final String json = "[\"ListItem1\",\"ListItem2\",{\"key1\":\"value1\",\"key2\":\"value2\"}]";
         final List<Object> list = instance.deserializeList( json, Object.class );
 
-        Assert.assertEquals( "ListItem1", list.get( 0 ) );
-        Assert.assertEquals( "ListItem2", list.get( 1 ) );
-        Assert.assertEquals( Map.of( "key1", "value1", "key2", "value2" ), list.get( 2 ) );
+        Assertions.assertEquals( "ListItem1", list.get( 0 ) );
+        Assertions.assertEquals( "ListItem2", list.get( 1 ) );
+        Assertions.assertEquals( Map.of( "key1", "value1", "key2", "value2" ), list.get( 2 ) );
     }
 
-    @Test
-    public void serializeNavTreeTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void serializeNavTreeTest( final JsonProvider instance )
             throws Exception
     {
         final List<NavTreeItem> navTreeItems = NavTreeDataMaker.makeNavTreeItems(
@@ -203,8 +202,9 @@ public class JsonProviderTest
         instance.serializeCollection( navTreeItems );
     }
 
-    @Test
-    public void serializeRestResultBeanTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void serializeRestResultBeanTest( final JsonProvider instance )
     {
         {
             final String expectedJson = "{\"data\":{\"key1\":1,\"key2\":\"value2\"},\"error\":false,\"errorCode\":0}";
@@ -213,33 +213,36 @@ public class JsonProviderTest
             data.put( "key2", "value2" );
             final RestResultBean<Map> restResultBean = RestResultBean.withData( data, Map.class );
             final String json = restResultBean.toJson( false );
-            Assert.assertEquals( expectedJson, json );
+            Assertions.assertEquals( expectedJson, json );
         }
 
     }
 
-    @Test
-    public void deserializeMap()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void deserializeMap( final JsonProvider instance )
     {
         final String json = "{\"key1\":1,\"key2\":\"String2\",\"key3\":[\"ListValue1\",\"ListValue2\"]}";
         final Map<String, Object> map = instance.deserializeMap( json,
                 String.class,
                 Object.class );
-        Assert.assertEquals( 1.0, map.get( "key1" ) );
-        Assert.assertEquals( "String2", map.get( "key2" ) );
-        Assert.assertEquals( List.of( "ListValue1", "ListValue2" ), map.get( "key3" ) );
+        Assertions.assertEquals( 1.0, map.get( "key1" ) );
+        Assertions.assertEquals( "String2", map.get( "key2" ) );
+        Assertions.assertEquals( List.of( "ListValue1", "ListValue2" ), map.get( "key3" ) );
     }
 
-    @Test
-    public void serializeObjectTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void serializeObjectTest( final JsonProvider instance )
     {
         final TestObject1 testObject1 = TestObject1.newTestObject();
         final String jsonValue = instance.serialize( testObject1 );
-        Assert.assertEquals( TestObject1.makeExpectedJsonValue( instance ), jsonValue );
+        Assertions.assertEquals( TestObject1.makeExpectedJsonValue( instance ), jsonValue );
     }
 
-    @Test
-    public void serializeTypeTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void serializeTypeTest( final JsonProvider instance )
     {
         final List<ActionConfiguration> srcList = new ArrayList<>();
         {
@@ -260,21 +263,22 @@ public class JsonProviderTest
 
         final List<ActionConfiguration> deserializedList = instance.deserializeList( json, ActionConfiguration.class );
 
-        Assert.assertEquals( srcList, deserializedList );
+        Assertions.assertEquals( srcList, deserializedList );
     }
 
-    @Test
-    public void typeTimeDurationJsonTest()
+    @ParameterizedTest
+    @MethodSource( "jsonProviders" )
+    public void typeTimeDurationJsonTest( final JsonProvider instance )
     {
         {
             final TimeDuration timeDuration = TimeDuration.MINUTE;
             final String json = instance.serialize( timeDuration );
-            Assert.assertEquals( "\"PT1M\"", json );
+            Assertions.assertEquals( "\"PT1M\"", json );
         }
         {
             final String json = "\"PT1M\"";
             final TimeDuration timeDuration = instance.deserialize( json, TimeDuration.class );
-            Assert.assertEquals( TimeDuration.MINUTE, timeDuration );
+            Assertions.assertEquals( TimeDuration.MINUTE, timeDuration );
         }
     }
 

+ 93 - 27
server/src/test/java/password/pwm/util/localdb/LocalDBBasicTest.java

@@ -20,28 +20,39 @@
 
 package password.pwm.util.localdb;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 import password.pwm.PwmApplication;
+import password.pwm.util.java.FileSystemUtility;
+import password.pwm.util.secure.PwmRandom;
 
 import java.io.File;
+import java.nio.file.Path;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
+@Execution( ExecutionMode.SAME_THREAD )
 public class LocalDBBasicTest
 {
-    @Rule
-    public TemporaryFolder testFolder = new TemporaryFolder();
+    private static final LocalDB.DB TEST_DB = LocalDB.DB.TEMP;
 
-    private LocalDB localDB;
+    private static final int BULK_COUNT = PwmRandom.getInstance().nextInt( 1_000 ) + 10_000;
+
+    @TempDir
+    public Path temporaryFolder;
 
+    private LocalDB localDB;
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
-        final File localDbTestFolder = testFolder.newFolder( "test-stored-queue-test" );
+        final File localDbTestFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-stored-queue-test" );
         final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( localDbTestFolder );
         localDB = LocalDBFactory.getInstance( localDbTestFolder, false, pwmApplication.getPwmEnvironment(), pwmApplication.getConfig() );
     }
@@ -49,29 +60,84 @@ public class LocalDBBasicTest
     @Test
     public void testBasicNarrative() throws LocalDBException
     {
-        Assert.assertEquals( 0, localDB.size( LocalDB.DB.TEMP ) );
+        Assertions.assertEquals( 0, localDB.size( LocalDB.DB.TEMP ) );
+
+        localDB.put( TEST_DB, "key1", "value1" );
+
+        Assertions.assertEquals( 1, localDB.size( TEST_DB ) );
+        Assertions.assertEquals( "value1", localDB.get( TEST_DB, "key1" ).orElseThrow() );
+        Assertions.assertTrue( localDB.contains( TEST_DB, "key1" ) );
+
+        localDB.remove( TEST_DB, "key1" );
+        Assertions.assertEquals( 0, localDB.size( TEST_DB ) );
+        Assertions.assertFalse( localDB.contains( TEST_DB, "key1" ) );
+
+        localDB.put( TEST_DB, "key1", "value1" );
+        localDB.put( TEST_DB, "key2", "value2" );
+
+        Assertions.assertEquals( 2, localDB.size( TEST_DB ) );
+        Assertions.assertEquals( "value1", localDB.get( TEST_DB, "key1" ).orElseThrow() );
+        Assertions.assertEquals( "value2", localDB.get( TEST_DB, "key2" ).orElseThrow() );
+        Assertions.assertTrue(  localDB.get( TEST_DB, "key3" ).isEmpty() );
+        Assertions.assertFalse( localDB.contains( TEST_DB, "key3" ) );
+
+        localDB.removeAll( TEST_DB, List.of( "key1", "key2" ) );
+        Assertions.assertEquals( 0, localDB.size( TEST_DB ) );
+    }
+
+    @Test
+    public void testPut() throws LocalDBException
+    {
+        Assertions.assertTrue( localDB.get( TEST_DB, "testKey1" ).isEmpty() );
+        localDB.put( TEST_DB, "testKey1", "testValue1" );
+        Assertions.assertEquals( "testValue1", localDB.get( TEST_DB, "testKey1" ).orElseThrow() );
+    }
+
+    @Test
+    public void testBulk() throws LocalDBException
+    {
+        localDB.truncate( TEST_DB );
+        Assertions.assertEquals( 0, localDB.size( TEST_DB ) );
+
+        final Set<String> keys = new HashSet<>();
+        final Set<String> values = new HashSet<>();
 
-        localDB.put( LocalDB.DB.TEMP, "key1", "value1" );
+        for ( int i = 0; i < BULK_COUNT; i++ )
+        {
+            final String key = "key" + i;
+            final String value = "value" + i;
+            keys.add( key );
+            values.add( value );
 
-        Assert.assertEquals( 1, localDB.size( LocalDB.DB.TEMP ) );
-        Assert.assertEquals( "value1", localDB.get( LocalDB.DB.TEMP, "key1" ).orElseThrow() );
-        Assert.assertTrue( localDB.contains( LocalDB.DB.TEMP, "key1" ) );
+            localDB.put( TEST_DB, key, value );
+        }
 
-        localDB.remove( LocalDB.DB.TEMP, "key1" );
-        Assert.assertEquals( 0, localDB.size( LocalDB.DB.TEMP ) );
-        Assert.assertFalse( localDB.contains( LocalDB.DB.TEMP, "key1" ) );
+        Assertions.assertEquals( BULK_COUNT, keys.size() );
+        Assertions.assertEquals( BULK_COUNT, values.size() );
+        Assertions.assertEquals( BULK_COUNT, localDB.size( TEST_DB ) );
 
-        localDB.put( LocalDB.DB.TEMP, "key1", "value1" );
-        localDB.put( LocalDB.DB.TEMP, "key2", "value2" );
+        try ( LocalDB.LocalDBIterator<Map.Entry<String, String>> iter = localDB.iterator( TEST_DB ) )
+        {
+            for ( int i = 0; i < BULK_COUNT; i++ )
+            {
+                final Map.Entry<String, String> nextEntry = iter.next();
+                final String key = nextEntry.getKey();
+                final String value = nextEntry.getValue();
+                Assertions.assertTrue( keys.contains( key ) );
+                Assertions.assertTrue( values.contains( value ) );
+                keys.remove( key );
+                values.remove( value );
 
-        Assert.assertEquals( 2, localDB.size( LocalDB.DB.TEMP ) );
-        Assert.assertEquals( "value1", localDB.get( LocalDB.DB.TEMP, "key1" ).orElseThrow() );
-        Assert.assertEquals( "value2", localDB.get( LocalDB.DB.TEMP, "key2" ).orElseThrow() );
-        Assert.assertTrue(  localDB.get( LocalDB.DB.TEMP, "key3" ).isEmpty() );
-        Assert.assertFalse( localDB.contains( LocalDB.DB.TEMP, "key3" ) );
+                if ( i < BULK_COUNT - 1 )
+                {
+                    Assertions.assertTrue( iter.hasNext() );
+                }
+            }
 
-        localDB.removeAll( LocalDB.DB.TEMP, List.of( "key1", "key2" ) );
-        Assert.assertEquals( 0, localDB.size( LocalDB.DB.TEMP ) );
+            Assertions.assertTrue( keys.isEmpty() );
+            Assertions.assertTrue( values.isEmpty() );
 
+            Assertions.assertFalse( iter.hasNext() );
+        }
     }
 }

+ 0 - 80
server/src/test/java/password/pwm/util/localdb/LocalDBExtendedTest.java

@@ -1,80 +0,0 @@
-/*
- * Password Management Servlets (PWM)
- * http://www.pwm-project.org
- *
- * Copyright (c) 2006-2009 Novell, Inc.
- * Copyright (c) 2009-2021 The PWM Project
- *
- * Licensed 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 password.pwm.util.localdb;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-
-import java.io.File;
-
-public class LocalDBExtendedTest
-{
-
-    @ClassRule
-    public static TemporaryFolder testFolder = new TemporaryFolder();
-
-    private static final LocalDB.DB TEST_DB = LocalDB.DB.TEMP;
-    private static LocalDB localDB;
-
-    @BeforeClass
-    public static void setUp() throws Exception
-    {
-        TestHelper.setupLogging();
-        final File fileLocation = testFolder.newFolder( "localdb-test" );
-        localDB = LocalDBFactory.getInstance( fileLocation, false, null, null );
-        localDB.truncate( TEST_DB );
-        Assert.assertEquals( 0, localDB.size( TEST_DB ) );
-    }
-
-    @Test
-    public void testPut() throws LocalDBException
-    {
-        Assert.assertNull( localDB.get( TEST_DB, "testKey1" ) );
-        localDB.put( TEST_DB, "testKey1", "testValue1" );
-        Assert.assertEquals( "testValue1", localDB.get( TEST_DB, "testKey1" ).orElseThrow() );
-    }
-
-    @Test
-    public void testSize() throws LocalDBException
-    {
-        final long startTime = System.currentTimeMillis();
-        for ( final LocalDB.DB loopDB : LocalDB.DB.values() )
-        {
-            final long size = localDB.size( loopDB );
-            //System.out.println( loopDB + " size=" + size );
-        }
-        //System.out.println( "total duration: " + TimeDuration.fromCurrent( startTime ).asLongString() );
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception
-    {
-        if ( localDB != null )
-        {
-            localDB.close();
-            localDB = null;
-        }
-    }
-}

+ 10 - 9
server/src/test/java/password/pwm/util/localdb/LocalDBLoggerExtendedTest.java

@@ -22,20 +22,19 @@ package password.pwm.util.localdb;
 
 import lombok.Builder;
 import lombok.Value;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.AppProperty;
 import password.pwm.config.AppConfig;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.stored.StoredConfigurationFactory;
 import password.pwm.util.EventRateMeter;
 import password.pwm.util.java.FileSystemUtility;
-import password.pwm.util.json.JsonFactory;
 import password.pwm.util.java.Percent;
 import password.pwm.util.java.StringUtil;
 import password.pwm.util.java.TimeDuration;
+import password.pwm.util.json.JsonFactory;
 import password.pwm.util.logging.LocalDBLogger;
 import password.pwm.util.logging.LocalDBLoggerSettings;
 import password.pwm.util.logging.PwmLogEvent;
@@ -45,6 +44,7 @@ import password.pwm.util.secure.PwmRandom;
 import java.io.File;
 import java.io.Serializable;
 import java.math.RoundingMode;
+import java.nio.file.Path;
 import java.text.NumberFormat;
 import java.time.Instant;
 import java.util.ArrayList;
@@ -76,15 +76,16 @@ public class LocalDBLoggerExtendedTest
     private static Settings settings;
     private Instant startTime;
 
-    @Rule
-    public TemporaryFolder testFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
         TestHelper.setupLogging();
-        final File localDBPath = testFolder.newFolder( "localdb-logger-test" );
+        final File localDBPath = FileSystemUtility.createDirectory( temporaryFolder, "test-localdb-logger-test" );
+
         config = AppConfig.forStoredConfig( StoredConfigurationFactory.newConfig() );
 
         localDB = LocalDBFactory.getInstance(

+ 75 - 74
server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueueExtendedTest.java

@@ -20,22 +20,23 @@
 
 package password.pwm.util.localdb;
 
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.java.TimeDuration;
 
 import java.io.File;
+import java.nio.file.Path;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 public class LocalDBStoredQueueExtendedTest
 {
-    @ClassRule
-    public static TemporaryFolder temporaryFolder = new TemporaryFolder( );
+    @TempDir
+    public static Path temporaryFolder;
 
     private static final int SIZE = 5;
 
@@ -44,12 +45,12 @@ public class LocalDBStoredQueueExtendedTest
 
     private static final boolean ENABLE_DEBUG_OUTPUT = false;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUp() throws Exception
     {
 
         TestHelper.setupLogging();
-        final File fileLocation = temporaryFolder.newFolder( "localdb-storedqueue-test" );
+        final File fileLocation = FileSystemUtility.createDirectory( temporaryFolder, "localdb-storedqueue-test" );
         localDB = LocalDBFactory.getInstance( fileLocation, false, null, null );
         storedQueue = LocalDBStoredQueue.createLocalDBStoredQueue( localDB, LocalDB.DB.TEMP, ENABLE_DEBUG_OUTPUT );
     }
@@ -57,13 +58,13 @@ public class LocalDBStoredQueueExtendedTest
     private void populatedQueue( final int n, final LocalDBStoredQueue storedQueue )
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
         for ( int i = 0; i < n; ++i )
         {
-            Assert.assertTrue( storedQueue.offer( String.valueOf( i ) ) );
+            Assertions.assertTrue( storedQueue.offer( String.valueOf( i ) ) );
         }
-        Assert.assertFalse( storedQueue.isEmpty() );
-        Assert.assertEquals( n, storedQueue.size() );
+        Assertions.assertFalse( storedQueue.isEmpty() );
+        Assertions.assertEquals( n, storedQueue.size() );
     }
 
 
@@ -74,7 +75,7 @@ public class LocalDBStoredQueueExtendedTest
     public void testEmpty()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
     }
 
     @Test
@@ -83,81 +84,81 @@ public class LocalDBStoredQueueExtendedTest
         storedQueue.clear();
         storedQueue.add( "value1" );
         storedQueue.add( "value2" );
-        Assert.assertEquals( 2, storedQueue.size() );
+        Assertions.assertEquals( 2, storedQueue.size() );
         storedQueue.remove();
-        Assert.assertEquals( 1, storedQueue.size() );
+        Assertions.assertEquals( 1, storedQueue.size() );
         storedQueue.remove();
-        Assert.assertTrue( storedQueue.isEmpty() );
-        Assert.assertEquals( 0, storedQueue.size() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertEquals( 0, storedQueue.size() );
 
         try
         {
             storedQueue.remove();
-            Assert.fail();
+            Assertions.fail();
         }
         catch ( final NoSuchElementException e )
         {
-            Assert.assertTrue( true );
+            Assertions.assertTrue( true );
         }
         catch ( final Exception e )
         {
-            Assert.fail();
+            Assertions.fail();
         }
 
-        Assert.assertTrue( storedQueue.isEmpty() );
-        Assert.assertEquals( 0, storedQueue.size() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertEquals( 0, storedQueue.size() );
     }
 
     @Test
     public void testDequeue()
     {
         storedQueue.clear();
-        Assert.assertEquals( 0, storedQueue.size() );
+        Assertions.assertEquals( 0, storedQueue.size() );
         storedQueue.addLast( "value3" );
-        Assert.assertEquals( 1, storedQueue.size() );
+        Assertions.assertEquals( 1, storedQueue.size() );
         storedQueue.addLast( "value4" );
-        Assert.assertEquals( 2, storedQueue.size() );
+        Assertions.assertEquals( 2, storedQueue.size() );
         storedQueue.addFirst( "value2" );
-        Assert.assertEquals( 3, storedQueue.size() );
+        Assertions.assertEquals( 3, storedQueue.size() );
         storedQueue.addFirst( "value1" );
-        Assert.assertEquals( 4, storedQueue.size() );
+        Assertions.assertEquals( 4, storedQueue.size() );
         storedQueue.addFirst( "value0" );
-        Assert.assertEquals( 5, storedQueue.size() );
+        Assertions.assertEquals( 5, storedQueue.size() );
 
         {
             final Iterator<String> iter = storedQueue.iterator();
-            Assert.assertTrue( iter.hasNext() );
-            Assert.assertEquals( "value0", iter.next() );
-            Assert.assertEquals( "value1", iter.next() );
-            Assert.assertEquals( "value2", iter.next() );
-            Assert.assertEquals( "value3", iter.next() );
-            Assert.assertEquals( "value4", iter.next() );
+            Assertions.assertTrue( iter.hasNext() );
+            Assertions.assertEquals( "value0", iter.next() );
+            Assertions.assertEquals( "value1", iter.next() );
+            Assertions.assertEquals( "value2", iter.next() );
+            Assertions.assertEquals( "value3", iter.next() );
+            Assertions.assertEquals( "value4", iter.next() );
         }
 
         {
             final Iterator<String> iter = storedQueue.descendingIterator();
-            Assert.assertTrue( iter.hasNext() );
-            Assert.assertEquals( "value4", iter.next() );
-            Assert.assertEquals( "value3", iter.next() );
-            Assert.assertEquals( "value2", iter.next() );
-            Assert.assertEquals( "value1", iter.next() );
-            Assert.assertEquals( "value0", iter.next() );
+            Assertions.assertTrue( iter.hasNext() );
+            Assertions.assertEquals( "value4", iter.next() );
+            Assertions.assertEquals( "value3", iter.next() );
+            Assertions.assertEquals( "value2", iter.next() );
+            Assertions.assertEquals( "value1", iter.next() );
+            Assertions.assertEquals( "value0", iter.next() );
         }
 
-        Assert.assertEquals( 5, storedQueue.size() );
-        Assert.assertEquals( "value0", storedQueue.removeFirst() );
-        Assert.assertEquals( 4, storedQueue.size() );
-        Assert.assertEquals( "value4", storedQueue.removeLast() );
-        Assert.assertEquals( 3, storedQueue.size() );
-
-        Assert.assertEquals( "value3", storedQueue.peekLast() );
-        Assert.assertEquals( "value1", storedQueue.peekFirst() );
-        Assert.assertEquals( "value3", storedQueue.pollLast() );
-        Assert.assertEquals( "value1", storedQueue.pollFirst() );
-        Assert.assertEquals( "value2", storedQueue.peek() );
-        Assert.assertEquals( "value2", storedQueue.peekLast() );
-        Assert.assertEquals( "value2", storedQueue.peekFirst() );
-        Assert.assertEquals( 1, storedQueue.size() );
+        Assertions.assertEquals( 5, storedQueue.size() );
+        Assertions.assertEquals( "value0", storedQueue.removeFirst() );
+        Assertions.assertEquals( 4, storedQueue.size() );
+        Assertions.assertEquals( "value4", storedQueue.removeLast() );
+        Assertions.assertEquals( 3, storedQueue.size() );
+
+        Assertions.assertEquals( "value3", storedQueue.peekLast() );
+        Assertions.assertEquals( "value1", storedQueue.peekFirst() );
+        Assertions.assertEquals( "value3", storedQueue.pollLast() );
+        Assertions.assertEquals( "value1", storedQueue.pollFirst() );
+        Assertions.assertEquals( "value2", storedQueue.peek() );
+        Assertions.assertEquals( "value2", storedQueue.peekLast() );
+        Assertions.assertEquals( "value2", storedQueue.peekFirst() );
+        Assertions.assertEquals( 1, storedQueue.size() );
     }
 
     /**
@@ -167,19 +168,19 @@ public class LocalDBStoredQueueExtendedTest
     public void testSize()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
 
         populatedQueue( SIZE, storedQueue );
-        Assert.assertEquals( SIZE, storedQueue.size() );
+        Assertions.assertEquals( SIZE, storedQueue.size() );
         for ( int i = 0; i < SIZE; ++i )
         {
             TimeDuration.of( 100, TimeDuration.Unit.MILLISECONDS ).pause();
-            Assert.assertEquals( SIZE - i, storedQueue.size() );
+            Assertions.assertEquals( SIZE - i, storedQueue.size() );
             storedQueue.remove();
         }
         for ( int i = 0; i < SIZE; ++i )
         {
-            Assert.assertEquals( i, storedQueue.size() );
+            Assertions.assertEquals( i, storedQueue.size() );
             storedQueue.add( String.valueOf( i ) );
         }
     }
@@ -191,11 +192,11 @@ public class LocalDBStoredQueueExtendedTest
     public void testOffer()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
 
-        Assert.assertTrue( storedQueue.offer( String.valueOf( 0 ) ) );
-        Assert.assertTrue( storedQueue.offer( String.valueOf( 1 ) ) );
-        Assert.assertEquals( 2, storedQueue.size() );
+        Assertions.assertTrue( storedQueue.offer( String.valueOf( 0 ) ) );
+        Assertions.assertTrue( storedQueue.offer( String.valueOf( 1 ) ) );
+        Assertions.assertEquals( 2, storedQueue.size() );
     }
 
     /**
@@ -205,12 +206,12 @@ public class LocalDBStoredQueueExtendedTest
     public void testAdd()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
 
         for ( int i = 0; i < SIZE; ++i )
         {
-            Assert.assertEquals( i, storedQueue.size() );
-            Assert.assertTrue( storedQueue.add( String.valueOf( i ) ) );
+            Assertions.assertEquals( i, storedQueue.size() );
+            Assertions.assertTrue( storedQueue.add( String.valueOf( i ) ) );
         }
     }
 
@@ -221,16 +222,16 @@ public class LocalDBStoredQueueExtendedTest
     public void testPoll()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
 
         populatedQueue( SIZE, storedQueue );
 
         for ( int i = SIZE - 1; i >= 0; i-- )
         {
-            Assert.assertEquals( i, Integer.parseInt( storedQueue.poll() ) );
+            Assertions.assertEquals( i, Integer.parseInt( storedQueue.poll() ) );
         }
 
-        Assert.assertNull( storedQueue.poll() );
+        Assertions.assertNull( storedQueue.poll() );
     }
 
     /**
@@ -240,16 +241,16 @@ public class LocalDBStoredQueueExtendedTest
     public void testPeek()
     {
         storedQueue.clear();
-        Assert.assertTrue( storedQueue.isEmpty() );
+        Assertions.assertTrue( storedQueue.isEmpty() );
 
         populatedQueue( SIZE, storedQueue );
 
         final int initialSize = storedQueue.size();
-        Assert.assertNotNull( storedQueue.peek() );
-        Assert.assertEquals( initialSize, storedQueue.size() );
+        Assertions.assertNotNull( storedQueue.peek() );
+        Assertions.assertEquals( initialSize, storedQueue.size() );
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDown() throws Exception
     {
         if ( storedQueue != null )

+ 19 - 19
server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueuePositionTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.localdb;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class LocalDBStoredQueuePositionTest
 {
@@ -29,52 +29,52 @@ public class LocalDBStoredQueuePositionTest
     public void positionTest()
     {
         final LocalDBStoredQueue.Position initialPosition = new LocalDBStoredQueue.Position( "0" );
-        Assert.assertEquals( "000000", initialPosition.toString() );
+        Assertions.assertEquals( "000000", initialPosition.toString() );
 
         {
             LocalDBStoredQueue.Position position = initialPosition.next();
-            Assert.assertEquals( "000001", position.toString() );
+            Assertions.assertEquals( "000001", position.toString() );
             position = position.next();
-            Assert.assertEquals( "000002", position.toString() );
+            Assertions.assertEquals( "000002", position.toString() );
             position = position.next();
-            Assert.assertEquals( "000003", position.toString() );
+            Assertions.assertEquals( "000003", position.toString() );
 
             position = position.previous();
-            Assert.assertEquals( "000002", position.toString() );
+            Assertions.assertEquals( "000002", position.toString() );
             position = position.previous();
-            Assert.assertEquals( "000001", position.toString() );
+            Assertions.assertEquals( "000001", position.toString() );
             position = position.previous();
-            Assert.assertEquals( "000000", position.toString() );
+            Assertions.assertEquals( "000000", position.toString() );
             position = position.previous();
-            Assert.assertEquals( "ZZZZZZ", position.toString() );
+            Assertions.assertEquals( "ZZZZZZ", position.toString() );
         }
 
         {
             LocalDBStoredQueue.Position position = initialPosition.previous();
-            Assert.assertEquals( "ZZZZZZ", position.toString() );
+            Assertions.assertEquals( "ZZZZZZ", position.toString() );
             position = position.previous();
-            Assert.assertEquals( "ZZZZZY", position.toString() );
+            Assertions.assertEquals( "ZZZZZY", position.toString() );
             position = position.previous();
-            Assert.assertEquals( "ZZZZZX", position.toString() );
+            Assertions.assertEquals( "ZZZZZX", position.toString() );
 
             position = position.next();
-            Assert.assertEquals( "ZZZZZY", position.toString() );
+            Assertions.assertEquals( "ZZZZZY", position.toString() );
             position = position.next();
-            Assert.assertEquals( "ZZZZZZ", position.toString() );
+            Assertions.assertEquals( "ZZZZZZ", position.toString() );
             position = position.next();
-            Assert.assertEquals( "000000", position.toString() );
+            Assertions.assertEquals( "000000", position.toString() );
             position = position.next();
-            Assert.assertEquals( "000001", position.toString() );
+            Assertions.assertEquals( "000001", position.toString() );
         }
 
         {
             final long distance = initialPosition.distanceToHead( new LocalDBStoredQueue.Position( "000003" ) );
-            Assert.assertEquals( 3, distance );
+            Assertions.assertEquals( 3, distance );
         }
 
         {
             final long distance = initialPosition.distanceToHead( new LocalDBStoredQueue.Position( "ZZZZZX" ) );
-            Assert.assertEquals( 2176782333L, distance );
+            Assertions.assertEquals( 2176782333L, distance );
         }
     }
 }

+ 108 - 96
server/src/test/java/password/pwm/util/localdb/LocalDBStoredQueueTest.java

@@ -20,98 +20,111 @@
 
 package password.pwm.util.localdb;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
+import password.pwm.util.java.FileSystemUtility;
 
 import java.io.File;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
-import java.util.stream.Collectors;
 
 public class LocalDBStoredQueueTest
 {
-    private static final int MAX_PROBLEM_SIZE = 100;
+    private static final int MAX_PROBLEM_SIZE = 10_000;
 
-    @Rule
-    public TemporaryFolder testFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
+    private LocalDB localDB;
     private LocalDBStoredQueue localDBStoredQueue;
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception
     {
-        final File localDbTestFolder = testFolder.newFolder( "test-stored-queue-test" );
+        final File localDbTestFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-stored-queue-test" );
         final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( localDbTestFolder );
-        final LocalDB localDB = LocalDBFactory.getInstance( localDbTestFolder, false, pwmApplication.getPwmEnvironment(), pwmApplication.getConfig() );
+        localDB = LocalDBFactory.getInstance( localDbTestFolder, false, pwmApplication.getPwmEnvironment(), pwmApplication.getConfig() );
         localDBStoredQueue = LocalDBStoredQueue.createLocalDBStoredQueue( localDB, LocalDB.DB.TEMP, true );
     }
 
+    @AfterEach
+    public void shutdown() throws Exception
+    {
+        localDB.close();
+        localDBStoredQueue = null;
+    }
+
     @Test
     public void testStoredQueueSimple() throws LocalDBException
     {
-        Assert.assertEquals( 0, localDBStoredQueue.size() );
+        Assertions.assertEquals( 0, localDBStoredQueue.size() );
 
         localDBStoredQueue.add( "one" );
-        Assert.assertEquals( 1, localDBStoredQueue.size() );
+        Assertions.assertEquals( 1, localDBStoredQueue.size() );
 
         localDBStoredQueue.add( "two" );
-        Assert.assertEquals( 2, localDBStoredQueue.size() );
+        Assertions.assertEquals( 2, localDBStoredQueue.size() );
 
         localDBStoredQueue.add( "three" );
-        Assert.assertEquals( 3, localDBStoredQueue.size() );
+        Assertions.assertEquals( 3, localDBStoredQueue.size() );
 
         localDBStoredQueue.removeFirst();
-        Assert.assertEquals( 2, localDBStoredQueue.size() );
+        Assertions.assertEquals( 2, localDBStoredQueue.size() );
 
         {
-            final List<String> values = localDBStoredQueue.stream().collect( Collectors.toList() );
-            Assert.assertEquals( 2, values.size() );
+            final List<String> values = new ArrayList<>( localDBStoredQueue );
+            Assertions.assertEquals( 2, values.size() );
         }
 
         {
             final List<String> values = new ArrayList<>( localDBStoredQueue );
-            Assert.assertEquals( 2, values.size() );
+            Assertions.assertEquals( 2, values.size() );
         }
     }
 
     @Test
     public void testStoredQueueBulk() throws LocalDBException
     {
+        Assertions.assertEquals( 0, localDBStoredQueue.size() );
+
         addValues( localDBStoredQueue, MAX_PROBLEM_SIZE );
 
-        Assert.assertEquals( MAX_PROBLEM_SIZE, localDBStoredQueue.size() );
-        Assert.assertEquals( "99", localDBStoredQueue.getFirst() );
-        Assert.assertEquals( "0", localDBStoredQueue.getLast() );
+        Assertions.assertEquals( MAX_PROBLEM_SIZE, localDBStoredQueue.size() );
+        Assertions.assertEquals( String.valueOf( MAX_PROBLEM_SIZE - 1 ), localDBStoredQueue.getFirst() );
+        Assertions.assertEquals( "0", localDBStoredQueue.getLast() );
 
-        for ( int i = 99; i > -1; i-- )
+        for ( int i = ( MAX_PROBLEM_SIZE - 1 ); i > -1; i-- )
         {
             localDBStoredQueue.removeLast();
-            Assert.assertEquals( i, localDBStoredQueue.size() );
+            Assertions.assertEquals( i, localDBStoredQueue.size() );
         }
     }
 
     @Test
     public void testStoredQueueIterators()
     {
+        Assertions.assertEquals( 0, localDBStoredQueue.size() );
+
         addValues( localDBStoredQueue, MAX_PROBLEM_SIZE );
 
-        Assert.assertEquals( MAX_PROBLEM_SIZE, localDBStoredQueue.size() );
+        Assertions.assertEquals( MAX_PROBLEM_SIZE, localDBStoredQueue.size() );
 
         {
             final Iterator<String> iter = localDBStoredQueue.descendingIterator();
             for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
             {
-                Assert.assertTrue( iter.hasNext() );
-                Assert.assertTrue( iter.hasNext() );
-                Assert.assertEquals( String.valueOf( i ), iter.next() );
+                Assertions.assertTrue( iter.hasNext() );
+                Assertions.assertTrue( iter.hasNext() );
+                Assertions.assertEquals( String.valueOf( i ), iter.next() );
             }
-            Assert.assertFalse( iter.hasNext() );
+            Assertions.assertFalse( iter.hasNext() );
 
             boolean seenNoSuchElementException = false;
             try
@@ -122,18 +135,18 @@ public class LocalDBStoredQueueTest
             {
                 seenNoSuchElementException = true;
             }
-            Assert.assertTrue( seenNoSuchElementException );
+            Assertions.assertTrue( seenNoSuchElementException );
         }
 
         {
             final Iterator<String> iter = localDBStoredQueue.iterator();
             for ( int i = ( MAX_PROBLEM_SIZE - 1 ); i > -1; i-- )
             {
-                Assert.assertTrue( iter.hasNext() );
-                Assert.assertTrue( iter.hasNext() );
-                Assert.assertEquals( String.valueOf( i ), iter.next() );
+                Assertions.assertTrue( iter.hasNext() );
+                Assertions.assertTrue( iter.hasNext() );
+                Assertions.assertEquals( String.valueOf( i ), iter.next() );
             }
-            Assert.assertFalse( iter.hasNext() );
+            Assertions.assertFalse( iter.hasNext() );
 
             boolean seenNoSuchElementException = false;
             try
@@ -144,7 +157,7 @@ public class LocalDBStoredQueueTest
             {
                 seenNoSuchElementException = true;
             }
-            Assert.assertTrue( seenNoSuchElementException );
+            Assertions.assertTrue( seenNoSuchElementException );
         }
     }
 
@@ -154,7 +167,7 @@ public class LocalDBStoredQueueTest
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addFirst( String.valueOf( i ) );
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
         }
 
         localDBStoredQueue.clear();
@@ -162,7 +175,7 @@ public class LocalDBStoredQueueTest
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addLast( String.valueOf( i ) );
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
         }
 
         localDBStoredQueue.clear();
@@ -174,7 +187,7 @@ public class LocalDBStoredQueueTest
 
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeLast() );
         }
     }
 
@@ -195,7 +208,7 @@ public class LocalDBStoredQueueTest
 
         for ( int i = aBunchOfString.length - 1; i >= 0; i-- )
         {
-            Assert.assertEquals( aBunchOfString[i], localDBStoredQueue.removeFirst() );
+            Assertions.assertEquals( aBunchOfString[i], localDBStoredQueue.removeFirst() );
         }
     }
 
@@ -216,7 +229,7 @@ public class LocalDBStoredQueueTest
 
         for ( int i = aBunchOfString.length - 1; i >= 0; i-- )
         {
-            Assert.assertEquals( aBunchOfString[i], localDBStoredQueue.removeLast() );
+            Assertions.assertEquals( aBunchOfString[i], localDBStoredQueue.removeLast() );
         }
     }
 
@@ -226,12 +239,11 @@ public class LocalDBStoredQueueTest
     {
         localDBStoredQueue.addFirst( "Something" );
         boolean empty = localDBStoredQueue.isEmpty();
-        Assert.assertFalse( empty );
+        Assertions.assertFalse( empty );
         localDBStoredQueue.removeFirst();
 
         empty = localDBStoredQueue.isEmpty();
-        Assert.assertTrue( "Should be empty after adding then removing",
-                empty );
+        Assertions.assertTrue( empty, "Should be empty after adding then removing" );
 
     }
 
@@ -239,32 +251,29 @@ public class LocalDBStoredQueueTest
     public void testIsEmptyAfterAddRemoveLast()
     {
         localDBStoredQueue.addLast( "Something" );
-        Assert.assertFalse( localDBStoredQueue.isEmpty() );
+        Assertions.assertFalse( localDBStoredQueue.isEmpty() );
         localDBStoredQueue.removeLast();
-        Assert.assertTrue( "Should be empty after adding then removing",
-                localDBStoredQueue.isEmpty() );
+        Assertions.assertTrue( localDBStoredQueue.isEmpty(), "Should be empty after adding then removing" );
 
     }
 
     @Test
     public void testIsEmptyAfterAddFirstRemoveLast()
     {
-        Assert.assertTrue( localDBStoredQueue.isEmpty() );
+        Assertions.assertTrue( localDBStoredQueue.isEmpty() );
         localDBStoredQueue.addFirst( "Something" );
-        Assert.assertFalse( localDBStoredQueue.isEmpty() );
+        Assertions.assertFalse( localDBStoredQueue.isEmpty() );
         localDBStoredQueue.removeLast();
-        Assert.assertTrue( "Should be empty after adding then removing",
-                localDBStoredQueue.isEmpty() );
+        Assertions.assertTrue( localDBStoredQueue.isEmpty(), "Should be empty after adding then removing" );
     }
 
     @Test
     public void testIsEmptyAfterAddLastRemoveFirst()
     {
         localDBStoredQueue.addLast( "Something" );
-        Assert.assertFalse( localDBStoredQueue.isEmpty() );
+        Assertions.assertFalse( localDBStoredQueue.isEmpty() );
         localDBStoredQueue.removeFirst();
-        Assert.assertTrue( "Should be empty after adding then removing",
-                localDBStoredQueue.isEmpty() );
+        Assertions.assertTrue( localDBStoredQueue.isEmpty(), "Should be empty after adding then removing" );
     }
 
     @Test
@@ -273,77 +282,79 @@ public class LocalDBStoredQueueTest
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addFirst( "Something" );
-            Assert.assertFalse( "Should not be empty after " + i + " item added",
-                    localDBStoredQueue.isEmpty() );
+            Assertions.assertFalse( localDBStoredQueue.isEmpty(), "Should not be empty after " + i + " item added" );
         }
 
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
-            Assert.assertFalse( "Should not be empty after " + i + " item removed",
-                    localDBStoredQueue.isEmpty() );
+            Assertions.assertFalse( localDBStoredQueue.isEmpty(), "Should not be empty after " + i + " item removed" );
             localDBStoredQueue.removeLast();
         }
 
-        Assert.assertTrue( "Should be empty after adding and removing "
-                        + MAX_PROBLEM_SIZE + " elements.",
-                localDBStoredQueue.isEmpty() );
+        Assertions.assertTrue( localDBStoredQueue.isEmpty(),
+                "Should be empty after adding and removing " + MAX_PROBLEM_SIZE + " elements." );
     }
 
     @Test
     public void testMultipleFillAndEmpty()
     {
-        for ( int tries = 0; tries < 50; tries++ )
+        final int outerLoopIterations = 10;
+        final int innerLoopIterations = 1_000;
+
+        localDBStoredQueue.clear();
+
+        for ( int tries = 0; tries < outerLoopIterations; tries++ )
         {
-            for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
+            for ( int i = 0; i < innerLoopIterations; i++ )
             {
                 localDBStoredQueue.addFirst( String.valueOf( i ) );
             }
 
-            Assert.assertFalse( localDBStoredQueue.isEmpty() );
+            Assertions.assertFalse( localDBStoredQueue.isEmpty() );
             int counter = 0;
             while ( !localDBStoredQueue.isEmpty() )
             {
-                Assert.assertEquals( String.valueOf( counter ), localDBStoredQueue.removeLast() );
+                Assertions.assertEquals( String.valueOf( counter ), localDBStoredQueue.removeLast() );
                 counter++;
             }
 
-            Assert.assertTrue( localDBStoredQueue.isEmpty() );
+            Assertions.assertTrue( localDBStoredQueue.isEmpty() );
 
-            for ( int j = 0; j < MAX_PROBLEM_SIZE; j++ )
+            for ( int j = 0; j < innerLoopIterations; j++ )
             {
                 localDBStoredQueue.addLast( String.valueOf( j ) );
             }
 
-            Assert.assertFalse( localDBStoredQueue.isEmpty() );
+            Assertions.assertFalse( localDBStoredQueue.isEmpty() );
 
             counter = 0;
             while ( !localDBStoredQueue.isEmpty() )
             {
-                Assert.assertEquals( String.valueOf( counter ), localDBStoredQueue.removeFirst() );
+                Assertions.assertEquals( String.valueOf( counter ), localDBStoredQueue.removeFirst() );
                 counter++;
             }
 
-            Assert.assertTrue( localDBStoredQueue.isEmpty() );
+            Assertions.assertTrue( localDBStoredQueue.isEmpty() );
         }
     }
 
     @Test
     public void testSize()
     {
-        Assert.assertEquals( 0, localDBStoredQueue.size() );
+        Assertions.assertEquals( 0, localDBStoredQueue.size() );
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addFirst( "Something" );
-            Assert.assertEquals( i + 1, localDBStoredQueue.size() );
+            Assertions.assertEquals( i + 1, localDBStoredQueue.size() );
         }
 
         for ( int i = MAX_PROBLEM_SIZE; i > 0; i-- )
         {
-            Assert.assertEquals( i, localDBStoredQueue.size() );
+            Assertions.assertEquals( i, localDBStoredQueue.size() );
             localDBStoredQueue.removeLast();
         }
 
-        Assert.assertEquals( 0, localDBStoredQueue.size() );
+        Assertions.assertEquals( 0, localDBStoredQueue.size() );
     }
 
     @Test
@@ -352,7 +363,7 @@ public class LocalDBStoredQueueTest
         try
         {
             localDBStoredQueue.addFirst( null );
-            Assert.fail( "Should have thrown a NullPointerException" );
+            Assertions.fail( "Should have thrown a NullPointerException" );
         }
         catch ( final NullPointerException npe )
         {
@@ -360,13 +371,13 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Wrong exception catched." + e );
+            Assertions.fail( "Wrong exception catched." + e );
         }
 
         try
         {
             localDBStoredQueue.addLast( null );
-            Assert.fail( "Should have thrown a NullPointerException" );
+            Assertions.fail( "Should have thrown a NullPointerException" );
         }
         catch ( final NullPointerException npe )
         {
@@ -374,7 +385,7 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Wrong exception catched." + e );
+            Assertions.fail( "Wrong exception cached." + e );
         }
     }
 
@@ -384,7 +395,7 @@ public class LocalDBStoredQueueTest
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addFirst( String.valueOf( i ) );
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
         }
 
         localDBStoredQueue.clear();
@@ -392,7 +403,7 @@ public class LocalDBStoredQueueTest
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
             localDBStoredQueue.addLast( String.valueOf( i ) );
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
         }
 
         localDBStoredQueue.clear();
@@ -404,7 +415,7 @@ public class LocalDBStoredQueueTest
 
         for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
         {
-            Assert.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
+            Assertions.assertEquals( String.valueOf( i ), localDBStoredQueue.removeFirst() );
         }
 
     }
@@ -414,9 +425,9 @@ public class LocalDBStoredQueueTest
     {
         try
         {
-            Assert.assertTrue( localDBStoredQueue.isEmpty() );
+            Assertions.assertTrue( localDBStoredQueue.isEmpty() );
             localDBStoredQueue.removeFirst();
-            Assert.fail( "Expected a NoSuchElementException" );
+            Assertions.fail( "Expected a NoSuchElementException" );
         }
         catch ( final NoSuchElementException nsee )
         {
@@ -424,14 +435,14 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Unexpected exception : " + e );
+            Assertions.fail( "Unexpected exception : " + e );
         }
 
         try
         {
-            Assert.assertTrue( localDBStoredQueue.isEmpty() );
+            Assertions.assertTrue( localDBStoredQueue.isEmpty() );
             localDBStoredQueue.removeLast();
-            Assert.fail( "Expected a NoSuchElementException" );
+            Assertions.fail( "Expected a NoSuchElementException" );
         }
         catch ( final NoSuchElementException nsee )
         {
@@ -439,12 +450,12 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Unexpected exception : " + e );
+            Assertions.fail( "Unexpected exception : " + e );
         }
 
         try
         {
-            Assert.assertTrue( localDBStoredQueue.isEmpty() );
+            Assertions.assertTrue( localDBStoredQueue.isEmpty() );
 
             for ( int i = 0; i < MAX_PROBLEM_SIZE; i++ )
             {
@@ -455,7 +466,7 @@ public class LocalDBStoredQueueTest
                 localDBStoredQueue.removeLast();
             }
             localDBStoredQueue.removeLast();
-            Assert.fail( "Expected a NoSuchElementException" );
+            Assertions.fail( "Expected a NoSuchElementException" );
         }
         catch ( final NoSuchElementException nsee )
         {
@@ -463,7 +474,7 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Unexpected exception : " + e );
+            Assertions.fail( "Unexpected exception : " + e );
         }
     }
 
@@ -474,7 +485,7 @@ public class LocalDBStoredQueueTest
         try
         {
             anIterator.remove();
-            Assert.fail( "Should have thrown an UnsupportedOperationException" );
+            Assertions.fail( "Should have thrown an UnsupportedOperationException" );
         }
         catch ( final UnsupportedOperationException uoe )
         {
@@ -482,7 +493,7 @@ public class LocalDBStoredQueueTest
         }
         catch ( final Exception e )
         {
-            Assert.fail( "Unexpected exception : " + e );
+            Assertions.fail( "Unexpected exception : " + e );
         }
     }
 
@@ -517,9 +528,10 @@ public class LocalDBStoredQueueTest
                 int index = 0;
                 while ( manyStringIterators[iterID].hasNext() )
                 {
-                    Assert.assertEquals( "Iterator #" + iterID + " failed:\n",
+                    Assertions.assertEquals(
                             String.valueOf( index ),
-                            manyStringIterators[iterID].next() );
+                            manyStringIterators[iterID].next(),
+                            "Iterator #" + iterID + " failed:\n" );
                     index++;
                 }
             }
@@ -544,7 +556,7 @@ public class LocalDBStoredQueueTest
 
         for ( final String loopString : aBunchOfString )
         {
-            Assert.assertEquals( loopString, localDBStoredQueue.removeLast() );
+            Assertions.assertEquals( loopString, localDBStoredQueue.removeLast() );
         }
     }
 
@@ -566,7 +578,7 @@ public class LocalDBStoredQueueTest
 
         for ( int i = aBunchOfString.length - 1; i >= 0; i-- )
         {
-            Assert.assertEquals( aBunchOfString[i], localDBStoredQueue.removeFirst() );
+            Assertions.assertEquals( aBunchOfString[i], localDBStoredQueue.removeFirst() );
         }
     }
 

+ 53 - 58
server/src/test/java/password/pwm/util/macro/MacroTest.java

@@ -20,11 +20,9 @@
 
 package password.pwm.util.macro;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.config.PwmSetting;
 import password.pwm.error.PwmUnrecoverableException;
@@ -36,12 +34,9 @@ import java.util.concurrent.TimeUnit;
 
 public class MacroTest
 {
-    @Rule
-    public TemporaryFolder testFolder = new TemporaryFolder();
-
     private MacroRequest macroRequest;
 
-    @Before
+    @BeforeEach
     public void setUp() throws PwmUnrecoverableException
     {
         macroRequest = SampleDataGenerator.sampleMacroRequest( null );
@@ -55,28 +50,28 @@ public class MacroTest
         {
             final String goal = "test " + PwmConstants.PWM_APP_NAME + " test";
             final String expanded = macroRequest.expandMacros( "test @PwmAppName@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
 
         {
             final String goal = "test " + PwmSetting.PWM_SITE_URL.toMenuLocationDebug( null, PwmConstants.DEFAULT_LOCALE ) + " test";
             final String expanded = macroRequest.expandMacros( "test @PwmSettingReference:pwm.selfURL@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // urlEncoding macro
         {
             final String goal = "https%3A%2F%2Fwww.example.com";
             final String expanded = macroRequest.expandMacros( "@Encode:urlPath:[[https://www.example.com]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // base64 macro
         {
             final String goal = "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20=";
             final String expanded = macroRequest.expandMacros( "@Encode:base64:[[https://www.example.com]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -87,28 +82,28 @@ public class MacroTest
         {
             final String goal = "f96b697d7cb7938d525a2f31aaf161d0";
             final String expanded = macroRequest.expandMacros( "@Hash:md5:[[message digest]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // sha1 macro
         {
             final String goal = "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8";
             final String expanded = macroRequest.expandMacros( "@Hash:sha1:[[password]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // sha256 macro
         {
             final String goal = "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8";
             final String expanded = macroRequest.expandMacros( "@Hash:sha256:[[password]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // sha512 macro
         {
             final String goal = "b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e07394c706a8bb980b1d7785e5976ec049b46df5f1326af5a2ea6d103fd07c95385ffab0cacbc86";
             final String expanded = macroRequest.expandMacros( "@Hash:sha512:[[password]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -117,7 +112,7 @@ public class MacroTest
     {
         final String goal = "test FLast test";
         final String expanded = macroRequest.expandMacros( "test @User:ID@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -125,7 +120,7 @@ public class MacroTest
     {
         final String goal = "test TUser test";
         final String expanded = macroRequest.expandMacros( "test @TargetUser:ID@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -134,25 +129,25 @@ public class MacroTest
         {
             final String goal = "UserPwExpireTime 2000-02-03T01:01:01Z test";
             final String expanded = macroRequest.expandMacros( "UserPwExpireTime @User:PwExpireTime@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "UserPwExpireTime 1:01 AM, UTC test";
             final String expanded = macroRequest.expandMacros( "UserPwExpireTime @User:PwExpireTime:K/:mm a, z@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "UserPwExpireTime 6:31 AM, IST test";
             final String expanded = macroRequest.expandMacros( "UserPwExpireTime @User:PwExpireTime:K/:mm a, z:IST@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "UserPwExpireTime 2000.02.03 test";
             final String expanded = macroRequest.expandMacros( "UserPwExpireTime @User:PwExpireTime:yyyy.MM.dd@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -162,25 +157,25 @@ public class MacroTest
         {
             final String goal = "TargetUserPwExpireTime 1973-01-03T22:45:21Z test";
             final String expanded = macroRequest.expandMacros( "TargetUserPwExpireTime @TargetUser:PwExpireTime@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "TargetUserPwExpireTime 10:45 PM, UTC test";
             final String expanded = macroRequest.expandMacros( "TargetUserPwExpireTime @TargetUser:PwExpireTime:K/:mm a, z@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "TargetUserPwExpireTime 4:15 AM, IST test";
             final String expanded = macroRequest.expandMacros( "TargetUserPwExpireTime @TargetUser:PwExpireTime:K/:mm a, z:IST@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "TargetUserPwExpireTime 1973.01.03 test";
             final String expanded = macroRequest.expandMacros( "TargetUserPwExpireTime @TargetUser:PwExpireTime:yyyy.MM.dd@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -190,25 +185,25 @@ public class MacroTest
         {
             final String goal = "OtpSetupTime 1999-10-30T04:56:04Z test";
             final String expanded = macroRequest.expandMacros( "OtpSetupTime @OtpSetupTime@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "OtpSetupTime 4:56 AM, UTC test";
             final String expanded = macroRequest.expandMacros( "OtpSetupTime @OtpSetupTime:K/:mm a, z@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "OtpSetupTime 10:26 AM, IST test";
             final String expanded = macroRequest.expandMacros( "OtpSetupTime @OtpSetupTime:K/:mm a, z:IST@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "OtpSetupTime 1999.10.30 test";
             final String expanded = macroRequest.expandMacros( "OtpSetupTime @OtpSetupTime:yyyy.MM.dd@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -218,25 +213,25 @@ public class MacroTest
         {
             final String goal = "ResponseSetupTime 1999-10-30T01:17:55Z test";
             final String expanded = macroRequest.expandMacros( "ResponseSetupTime @ResponseSetupTime@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "ResponseSetupTime 1:17 AM, UTC test";
             final String expanded = macroRequest.expandMacros( "ResponseSetupTime @ResponseSetupTime:K/:mm a, z@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "ResponseSetupTime 6:47 AM, IST test";
             final String expanded = macroRequest.expandMacros( "ResponseSetupTime @ResponseSetupTime:K/:mm a, z:IST@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         {
             final String goal = "ResponseSetupTime 1999.10.30 test";
             final String expanded = macroRequest.expandMacros( "ResponseSetupTime @ResponseSetupTime:yyyy.MM.dd@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -248,7 +243,7 @@ public class MacroTest
         final long days = TimeUnit.DAYS.convert( duration.toMillis(), TimeUnit.MILLISECONDS );
         final String goal = "UserDaysUntilPwExpire " + days + " test";
         final String expanded = macroRequest.expandMacros( "UserDaysUntilPwExpire @User:DaysUntilPwExpire@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
 
@@ -261,7 +256,7 @@ public class MacroTest
 
         final String goal = "TargetUserDaysUntilPwExpire " + days + " test";
         final String expanded = macroRequest.expandMacros( "TargetUserDaysUntilPwExpire @TargetUser:DaysUntilPwExpire@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -270,7 +265,7 @@ public class MacroTest
 
         final String goal = "UserPassword PaSSw0rd test";
         final String expanded = macroRequest.expandMacros( "UserPassword @User:Password@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -279,7 +274,7 @@ public class MacroTest
 
         final String goal = "UserEmail FLast@example.com test";
         final String expanded = macroRequest.expandMacros( "UserEmail @User:Email@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -288,7 +283,7 @@ public class MacroTest
 
         final String goal = "TargetUserEmail TUser@example.com test";
         final String expanded = macroRequest.expandMacros( "TargetUserEmail @TargetUser:Email@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
 
@@ -298,7 +293,7 @@ public class MacroTest
 
         final String goal = "UserDN cn=FLast,ou=test,o=org test";
         final String expanded = macroRequest.expandMacros( "UserDN @LDAP:DN@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -306,7 +301,7 @@ public class MacroTest
     {
         final String goal = "UserLdapProfile default ProfileName test";
         final String expanded = macroRequest.expandMacros( "UserLdapProfile @User:LdapProfile:ID@ @User:LdapProfile:Name@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -314,7 +309,7 @@ public class MacroTest
     {
         final String goal = "UserDomain default test";
         final String expanded = macroRequest.expandMacros( "UserDomain @User:Domain:ID@ test" );
-        Assert.assertEquals( goal, expanded );
+        Assertions.assertEquals( goal, expanded );
     }
 
     @Test
@@ -324,35 +319,35 @@ public class MacroTest
         {
             final String goal = "cn=FLast,ou=test,o=org";
             final String expanded = macroRequest.expandMacros( "@LDAP:dn@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
 
         {
             final String goal = "test cn%3DFLast%2Cou%3Dtest%2Co%3Dorg";
             final String expanded = macroRequest.expandMacros( "test @Encode:urlPath:[[@LDAP:dn@]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute macro
         {
             final String goal = "test First test";
             final String expanded = macroRequest.expandMacros( "test @LDAP:givenName@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars macro
         {
             final String goal = "test Firs test";
             final String expanded = macroRequest.expandMacros( "test @LDAP:givenName:4@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars and pad macro
         {
             final String goal = "test Firstooooo test";
             final String expanded = macroRequest.expandMacros( "test @LDAP:givenName:10:o@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -363,35 +358,35 @@ public class MacroTest
         {
             final String goal = "cn=TUser,ou=test,o=org";
             final String expanded = macroRequest.expandMacros( "@TargetUser:LDAP:dn@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
 
         {
             final String goal = "test cn%3DTUser%2Cou%3Dtest%2Co%3Dorg";
             final String expanded = macroRequest.expandMacros( "test @Encode:urlPath:[[@TargetUser:LDAP:dn@]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute macro
         {
             final String goal = "test Target test";
             final String expanded = macroRequest.expandMacros( "test @TargetUser:LDAP:givenName@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars macro
         {
             final String goal = "test Targ test";
             final String expanded = macroRequest.expandMacros( "test @TargetUser:LDAP:givenName:4@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars and pad macro
         {
             final String goal = "test Targetoooo test";
             final String expanded = macroRequest.expandMacros( "test @TargetUser:LDAP:givenName:10:o@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 
@@ -402,35 +397,35 @@ public class MacroTest
         {
             final String goal = "cn=FLast,ou=test,o=org";
             final String expanded = macroRequest.expandMacros( "@User:LDAP:dn@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
 
         {
             final String goal = "test cn%3DFLast%2Cou%3Dtest%2Co%3Dorg";
             final String expanded = macroRequest.expandMacros( "test @Encode:urlPath:[[@User:LDAP:dn@]]@" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute macro
         {
             final String goal = "test First test";
             final String expanded = macroRequest.expandMacros( "test @User:LDAP:givenName@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars macro
         {
             final String goal = "test Firs test";
             final String expanded = macroRequest.expandMacros( "test @User:LDAP:givenName:4@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
 
         // user attribute with max chars and pad macro
         {
             final String goal = "test Firstooooo test";
             final String expanded = macroRequest.expandMacros( "test @User:LDAP:givenName:10:o@ test" );
-            Assert.assertEquals( goal, expanded );
+            Assertions.assertEquals( goal, expanded );
         }
     }
 }

+ 11 - 11
server/src/test/java/password/pwm/util/otp/OTPPamUtilTest.java

@@ -20,12 +20,12 @@
 
 package password.pwm.util.otp;
 
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import password.pwm.svc.otp.OTPPamUtil;
 
 import java.util.List;
@@ -40,22 +40,22 @@ public class OTPPamUtilTest
     {
     }
 
-    @BeforeClass
+    @BeforeAll
     public static void setUpClass()
     {
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDownClass()
     {
     }
 
-    @Before
+    @BeforeEach
     public void setUp()
     {
     }
 
-    @After
+    @AfterEach
     public void tearDown()
     {
     }
@@ -68,7 +68,7 @@ public class OTPPamUtilTest
     {
         final String text = "TUC2JMV7BLJVV6YX\r\n\" WINDOW_SIZE -1\r\n\" TOTP_AUTH\r\n72706699\r\n";
         final List<String> result = OTPPamUtil.splitLines( text );
-        Assert.assertEquals( 4, result.size() );
+        Assertions.assertEquals( 4, result.size() );
     }
 
     /**

+ 14 - 40
server/src/test/java/password/pwm/util/otp/OTPUrlUtilTest.java

@@ -20,11 +20,10 @@
 
 package password.pwm.util.otp;
 
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import password.pwm.svc.otp.OTPUrlUtil;
+import password.pwm.svc.otp.OTPUserRecord;
 
 /**
  * @author mpieters
@@ -32,47 +31,22 @@ import org.junit.Test;
 public class OTPUrlUtilTest
 {
 
-    public OTPUrlUtilTest()
-    {
-    }
-
-    @BeforeClass
-    public static void setUpClass()
-    {
-    }
-
-    @AfterClass
-    public static void tearDownClass()
-    {
-    }
-
-    @Before
-    public void setUp()
-    {
-    }
-
-    @After
-    public void tearDown()
-    {
-    }
-
     /**
      * Test of composeOtpUrl method and decomposeOtpUrl, of class OTPUrlUtil.
      */
     @Test
     public void testComposeAndDecomposeOtpUrl()
     {
-        /*
-        System.out.println("composeOtpUrl");
-        OTPUserRecord otp = new OTPUserRecord("TEST");
-        otp.setSecret("2222222222222222");
-        String result = OTPUrlUtil.composeOtpUrl(otp);
-        System.out.println(result);
-        OTPUserRecord xotp = OTPUrlUtil.decomposeOtpUrl(result);
-        assertNotNull(xotp);
-        assertEquals(otp.getIdentifier(), xotp.getIdentifier());
-        assertEquals(otp.getSecret(), xotp.getSecret());
-        */
+
+        final OTPUserRecord otp = new OTPUserRecord();
+        otp.setIdentifier( "TEST" );
+        otp.setSecret( "2222222222222222" );
+
+        final String result = OTPUrlUtil.composeOtpUrl( otp );
+        final OTPUserRecord xotp = OTPUrlUtil.decomposeOtpUrl( result );
+        Assertions.assertNotNull( xotp );
+        Assertions.assertEquals( otp.getIdentifier(), xotp.getIdentifier() );
+        Assertions.assertEquals( otp.getSecret(), xotp.getSecret() );
     }
 
 }

+ 10 - 14
server/src/test/java/password/pwm/util/password/PasswordRuleChecksTest.java

@@ -24,10 +24,9 @@ import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matcher;
 import org.hamcrest.MatcherAssert;
 import org.hamcrest.core.IsCollectionContaining;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.PwmDomain;
 import password.pwm.bean.DomainID;
@@ -37,10 +36,11 @@ import password.pwm.config.profile.PwmPasswordRule;
 import password.pwm.error.ErrorInformation;
 import password.pwm.error.PwmError;
 import password.pwm.error.PwmUnrecoverableException;
-import password.pwm.util.localdb.LocalDBStoredQueue;
+import password.pwm.util.java.FileSystemUtility;
 import password.pwm.util.localdb.TestHelper;
 
 import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -49,19 +49,15 @@ import java.util.stream.Collectors;
 
 public class PasswordRuleChecksTest
 {
-
-
-    @Rule
-    public TemporaryFolder testFolder = new TemporaryFolder();
-
-    private LocalDBStoredQueue localDBStoredQueue;
+    @TempDir
+    public Path temporaryFolder;
 
     private PwmApplication pwmApplication;
 
-    @Before
-    public void setUp() throws Exception
+    @BeforeEach
+    void beforeAll() throws Exception
     {
-        final File localDbTestFolder = testFolder.newFolder( "test-stored-queue-test" );
+        final File localDbTestFolder = FileSystemUtility.createDirectory( temporaryFolder, "test-stored-queue-test" );
         this.pwmApplication = TestHelper.makeTestPwmApplication( localDbTestFolder );
     }
 

+ 70 - 70
server/src/test/java/password/pwm/util/password/PwmPasswordRuleValidatorTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.password;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class PwmPasswordRuleValidatorTest
 {
@@ -30,91 +30,91 @@ public class PwmPasswordRuleValidatorTest
     {
         // containsDisallowedValue([new password], [disallowed value], [character match threshold])
 
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "n", "n", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "N", "n", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "n", "N", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "N", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "o", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "V", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "e", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "l", 0 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "n", "n", 10 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "n", "n", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "N", "n", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "n", "N", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "N", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "o", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "V", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "e", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "l", 0 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "n", "n", 10 ) );
 
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 0 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 5 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 6 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 7 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "foo", 0 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 0 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 5 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 6 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "novell", 7 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "foo", 0 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "novell", "", 0 ) );
 
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 1 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 2 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 3 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 4 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 5 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 6 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 1 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 2 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 3 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 5 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "novell", 6 ) );
 
         // Case shouldn't matter
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 1 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 2 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 3 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 4 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 5 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 6 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 1 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 2 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 3 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 4 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 5 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 6 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 1 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 2 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 3 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 5 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "LOVE", "novell", 6 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 1 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 2 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 3 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 5 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.containsDisallowedValue( "love", "NOVELL", 6 ) );
 
         // Play around the threshold boundaries
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-nove-bar", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-ovel-bar", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-vell-bar", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-nove", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-ovel", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-vell", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "nove-bar", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "ovel-bar", "novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "vell-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-nove-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-ovel-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-vell-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-nove", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-ovel", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "foo-vell", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "nove-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "ovel-bar", "novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.containsDisallowedValue( "vell-bar", "novell", 4 ) );
     }
 
     @Test
     public void testTooManyConsecutiveChars()
     {
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( null, 4 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( null, 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "", 4 ) );
 
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "12345678", 0 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 0 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "12345678", 0 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 0 ) );
 
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 1 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 1 ) );
         // 'n' and 'o' are consecutive
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 2 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 3 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 4 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 5 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 6 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 2 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 3 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 5 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novell", 6 ) );
 
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "xyznovell", 3 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novellabc", 3 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novfghell", 3 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "xyznovell", 3 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novellabc", 3 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "novfghell", 3 ) );
 
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Novell1235", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Novell1234", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "1234Novell", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Nov1234ell", 4 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Novell1235", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Novell1234", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "1234Novell", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "Nov1234ell", 4 ) );
 
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "123novabcellxyz", 4 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "123novabcellxyz", 3 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "123novabcellxyz", 4 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "123novabcellxyz", 3 ) );
 
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", -1 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 0 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 1 ) );
-        Assert.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 27 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 26 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 25 ) );
-        Assert.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 2 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", -1 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 0 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 1 ) );
+        Assertions.assertFalse( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 27 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 26 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 25 ) );
+        Assertions.assertTrue( PwmPasswordRuleUtil.tooManyConsecutiveChars( "abcdefghijklmnopqrstuvwxyz", 2 ) );
     }
 }

+ 8 - 8
server/src/test/java/password/pwm/util/password/RandomPasswordGeneratorTest.java

@@ -20,10 +20,9 @@
 
 package password.pwm.util.password;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import password.pwm.PwmApplication;
 import password.pwm.PwmDomain;
 import password.pwm.bean.DomainID;
@@ -35,6 +34,7 @@ import password.pwm.util.PasswordData;
 import password.pwm.util.localdb.TestHelper;
 
 import java.io.IOException;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -42,15 +42,15 @@ import java.util.Set;
 
 public class RandomPasswordGeneratorTest
 {
-    @Rule
-    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+    @TempDir
+    public Path temporaryFolder;
 
 
     @Test
     public void generateRandomPasswordsTest()
             throws PwmUnrecoverableException, IOException
     {
-        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.newFolder() );
+        final PwmApplication pwmApplication = TestHelper.makeTestPwmApplication( temporaryFolder.toFile() );
         final PwmDomain pwmDomain = pwmApplication.domains().get( DomainID.DOMAIN_ID_DEFAULT );
         final Map<String, String> policyMap = new HashMap<>( PwmPasswordPolicy.defaultPolicy().getPolicyMap() );
         policyMap.put( PwmPasswordRule.AllowNumeric.getKey(), "true" );
@@ -69,7 +69,7 @@ public class RandomPasswordGeneratorTest
             final String passwordString = passwordData.getStringValue();
             if ( seenValues.contains( passwordString ) )
             {
-                Assert.fail( "repeated random generated password" );
+                Assertions.fail( "repeated random generated password" );
             }
             seenValues.add( passwordString );
         }

+ 1 - 1
server/src/test/java/password/pwm/util/secure/PromiscuousTrustManagerTest.java

@@ -20,7 +20,7 @@
 
 package password.pwm.util.secure;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import javax.net.ssl.X509TrustManager;
 import java.io.IOException;

+ 3 - 3
server/src/test/java/password/pwm/util/secure/self/SelfCertAppItemGeneratorTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.util.secure.self;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import password.pwm.PwmConstants;
 import password.pwm.util.PasswordData;
 
@@ -38,6 +38,6 @@ public class SelfCertAppItemGeneratorTest
         final KeyStore keyStore = SelfCertFactory.generateNewCert( SelfCertSettings.builder().build(), null, new PasswordData( "password" ), "alias" );
         final Certificate certificate = keyStore.getCertificate( "alias" );
         final String subjectDN = ( ( X509Certificate) certificate ).getSubjectDN().getName();
-        Assert.assertEquals( "CN=" + PwmConstants.PWM_APP_NAME.toLowerCase() + ".example.com", subjectDN );
+        Assertions.assertEquals( "CN=" + PwmConstants.PWM_APP_NAME.toLowerCase() + ".example.com", subjectDN );
     }
 }

+ 9 - 9
server/src/test/java/password/pwm/ws/server/rest/RestServletTest.java

@@ -20,8 +20,8 @@
 
 package password.pwm.ws.server.rest;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.reflections.Reflections;
 import org.reflections.scanners.Scanners;
 import org.reflections.util.ClasspathHelper;
@@ -55,7 +55,7 @@ public class RestServletTest
         {
             if ( restServlet.getAnnotation( RestWebServer.class ) == null )
             {
-                Assert.fail( restServlet.getName() + " is missing annotation type of " + RestWebServer.class.getName() );
+                Assertions.fail( restServlet.getName() + " is missing annotation type of " + RestWebServer.class.getName() );
             }
 
             final Collection<Method> methods = JavaHelper.getAllMethodsForClass( restServlet );
@@ -83,7 +83,7 @@ public class RestServletTest
 
                         if ( requiresRestResultBeanReturnType )
                         {
-                            Assert.fail( "method " + restServlet.getName()
+                            Assertions.fail( "method " + restServlet.getName()
                                     + ":" + method.getName() + " should have return type of " + RestResultBean.class.getName() );
                         }
                     }
@@ -91,25 +91,25 @@ public class RestServletTest
                     final Class[] paramTypes = method.getParameterTypes();
                     if ( paramTypes == null || paramTypes.length != 1 )
                     {
-                        Assert.fail( "method " + restServlet.getName()
+                        Assertions.fail( "method " + restServlet.getName()
                                 + ":" + method.getName() + " should have exactly one parameter" );
                     }
 
                     final String paramTypeName = paramTypes[0].getName();
                     if ( !paramTypeName.equals( RestRequest.class.getName() ) )
                     {
-                        Assert.fail( "method " + restServlet.getName()
+                        Assertions.fail( "method " + restServlet.getName()
                                 + ":" + method.getName() + " parameter type must be type " + RestRequest.class.getName() );
                     }
 
                     if ( seenHandlers.contains( methodHandler ) )
                     {
-                        Assert.fail( "duplicate " + RestMethodHandler.class + " assertions on class " + restServlet.getName() );
+                        Assertions.fail( "duplicate " + RestMethodHandler.class + " assertions on class " + restServlet.getName() );
                     }
 
                     if ( !Modifier.isPublic( method.getModifiers() ) )
                     {
-                        Assert.fail( "duplicate " + RestMethodHandler.class + " assertions on class " + restServlet.getName() );
+                        Assertions.fail( "duplicate " + RestMethodHandler.class + " assertions on class " + restServlet.getName() );
                     }
                     seenHandlers.add( methodHandler );
                 }
@@ -132,7 +132,7 @@ public class RestServletTest
                 {
                     if ( !Modifier.isPublic( method.getModifiers() ) )
                     {
-                        Assert.fail( "method " + method + " must be public" );
+                        Assertions.fail( "method " + method + " must be public" );
                     }
                 }
             }