You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/09/27 15:15:20 UTC

[commons-rng] branch master updated (43d76ca9 -> c362706c)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


    from 43d76ca9 Use final
     new e309e825 Use randomly chosen high-quality RNG for the sampling tests
     new 5cebe6b8 Use a fixed seed high-quality RNG for selected sampling tests
     new 54dc197b Update user guide performance tables to include new RNGs
     new c362706c Update LXM generator reference data

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../rng/core/source64/L128X1024MixTest.java        | 100 +++++-----
 .../commons/rng/core/source64/L128X128MixTest.java |  82 ++++----
 .../commons/rng/core/source64/L64X1024MixTest.java | 100 +++++-----
 .../commons/rng/core/source64/L64X128MixTest.java  |  76 +++----
 .../rng/core/source64/L64X128StarStarTest.java     |  79 ++++----
 .../commons/rng/core/source64/L64X256MixTest.java  |  82 ++++----
 .../rng/sampling/CollectionSamplerTest.java        |  12 +-
 .../rng/sampling/CombinationSamplerTest.java       |  21 +-
 .../rng/sampling/CompositeSamplersTest.java        |  73 +++----
 .../DiscreteProbabilityCollectionSamplerTest.java  |  14 +-
 .../commons/rng/sampling/ListSamplerTest.java      |  44 +++--
 .../commons/rng/sampling/ObjectSamplerTest.java    |   2 +-
 .../rng/sampling/PermutationSamplerTest.java       |  27 +--
 .../apache/commons/rng/sampling/RandomAssert.java  | 102 +++++++++-
 .../rng/sampling/UnitSphereSamplerTest.java        |  17 +-
 .../AhrensDieterExponentialSamplerTest.java        |   9 +-
 ...AhrensDieterMarsagliaTsangGammaSamplerTest.java |  14 +-
 .../AliasMethodDiscreteSamplerTest.java            |  12 +-
 .../distribution/BoxMullerGaussianSamplerTest.java |   9 +-
 .../BoxMullerLogNormalSamplerTest.java             |   9 +-
 .../BoxMullerNormalisedGaussianSamplerTest.java    |   5 +-
 .../distribution/ChengBetaSamplerTest.java         |  14 +-
 .../ContinuousSamplerParametricTest.java           |   3 +-
 .../distribution/ContinuousSamplerTest.java        |   3 +-
 .../distribution/ContinuousSamplersList.java       | 111 ++++++-----
 .../distribution/ContinuousUniformSamplerTest.java |  11 +-
 .../distribution/DirichletSamplerTest.java         |  24 +--
 .../DiscreteSamplerParametricTest.java             |   6 +-
 .../sampling/distribution/DiscreteSamplerTest.java |   3 +-
 .../distribution/DiscreteSamplersList.java         |  70 ++++---
 .../distribution/DiscreteUniformSamplerTest.java   |  29 ++-
 .../FastLoadedDiceRollerDiscreteSamplerTest.java   |  10 +-
 .../sampling/distribution/GaussianSamplerTest.java |  27 +--
 .../distribution/GeometricSamplerTest.java         |  17 +-
 .../GuideTableDiscreteSamplerTest.java             |  11 +-
 .../InverseTransformContinuousSamplerTest.java     |   5 +-
 .../InverseTransformDiscreteSamplerTest.java       |   5 +-
 .../InverseTransformParetoSamplerTest.java         |  14 +-
 .../KempSmallMeanPoissonSamplerTest.java           |   5 +-
 .../distribution/LargeMeanPoissonSamplerTest.java  |  34 ++--
 .../rng/sampling/distribution/LevySamplerTest.java |  10 +-
 .../distribution/LogNormalSamplerTest.java         |  15 +-
 .../rng/sampling/distribution/LongSamplerTest.java |   3 +-
 .../MarsagliaNormalisedGaussianSamplerTest.java    |   5 +-
 .../MarsagliaTsangWangDiscreteSamplerTest.java     |  11 +-
 .../distribution/PoissonSamplerCacheTest.java      |   8 +-
 .../sampling/distribution/PoissonSamplerTest.java  |   7 +-
 .../RejectionInversionZipfSamplerTest.java         |  16 +-
 .../rng/sampling/distribution/SamplerBaseTest.java |   8 +-
 .../distribution/SmallMeanPoissonSamplerTest.java  |   9 +-
 .../sampling/distribution/StableSamplerTest.java   |  22 +--
 .../rng/sampling/distribution/TSamplerTest.java    |  11 +-
 .../distribution/UniformLongSamplerTest.java       |  24 +--
 .../ZigguratNormalizedGaussianSamplerTest.java     |   9 +-
 .../sampling/distribution/ZigguratSamplerTest.java |  24 +--
 .../commons/rng/sampling/shape/BoxSamplerTest.java |  30 ++-
 .../rng/sampling/shape/LineSamplerTest.java        |  30 ++-
 .../rng/sampling/shape/TetrahedronSamplerTest.java |  30 ++-
 .../rng/sampling/shape/TriangleSamplerTest.java    |  36 ++--
 .../rng/sampling/shape/UnitBallSamplerTest.java    |  17 +-
 src/site/apt/userguide/rng.apt                     | 220 ++++++++++++---------
 61 files changed, 941 insertions(+), 895 deletions(-)


[commons-rng] 02/04: Use a fixed seed high-quality RNG for selected sampling tests

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 5cebe6b83c0aeb8ecc96f1122d2db45e0ab53a43
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Sep 27 14:31:43 2022 +0100

    Use a fixed seed high-quality RNG for selected sampling tests
    
    Many tests use SPLIT_MIX_64.create(0) to provided a quality generator
    with low construction cost. This has been moved to
    RandomAssert.seededRNG() where the seed will be fixed for the JVM but
    likely to change across JVM instances.
    
    Some tests have been updated to use RandomAssert.createRNG when there is
    a stochastic nature to the assertions and re-running would likely pass
    the test.
    
    Organisation of imports was performed to consolidate changes across the
    test classes.
---
 .../rng/sampling/CollectionSamplerTest.java        | 10 ++-
 .../rng/sampling/CombinationSamplerTest.java       | 21 ++++---
 .../rng/sampling/CompositeSamplersTest.java        | 73 +++++++++++-----------
 .../DiscreteProbabilityCollectionSamplerTest.java  | 12 ++--
 .../commons/rng/sampling/ListSamplerTest.java      | 44 ++++++-------
 .../rng/sampling/PermutationSamplerTest.java       | 27 ++++----
 .../apache/commons/rng/sampling/RandomAssert.java  | 46 ++++++++++++++
 .../rng/sampling/UnitSphereSamplerTest.java        | 17 +++--
 .../AhrensDieterExponentialSamplerTest.java        |  9 +--
 ...AhrensDieterMarsagliaTsangGammaSamplerTest.java | 14 ++---
 .../AliasMethodDiscreteSamplerTest.java            |  8 +--
 .../distribution/BoxMullerGaussianSamplerTest.java |  9 ++-
 .../BoxMullerLogNormalSamplerTest.java             |  9 ++-
 .../BoxMullerNormalisedGaussianSamplerTest.java    |  5 +-
 .../distribution/ChengBetaSamplerTest.java         | 14 ++---
 .../ContinuousSamplerParametricTest.java           |  3 +-
 .../distribution/ContinuousSamplersList.java       |  3 +-
 .../distribution/ContinuousUniformSamplerTest.java |  9 ++-
 .../distribution/DirichletSamplerTest.java         | 22 +++----
 .../DiscreteSamplerParametricTest.java             |  6 +-
 .../distribution/DiscreteSamplersList.java         |  4 +-
 .../distribution/DiscreteUniformSamplerTest.java   | 27 ++++----
 .../FastLoadedDiceRollerDiscreteSamplerTest.java   |  4 +-
 .../sampling/distribution/GaussianSamplerTest.java | 27 +++-----
 .../distribution/GeometricSamplerTest.java         | 17 +++--
 .../GuideTableDiscreteSamplerTest.java             |  7 +--
 .../InverseTransformContinuousSamplerTest.java     |  5 +-
 .../InverseTransformDiscreteSamplerTest.java       |  5 +-
 .../InverseTransformParetoSamplerTest.java         | 14 ++---
 .../KempSmallMeanPoissonSamplerTest.java           |  5 +-
 .../distribution/LargeMeanPoissonSamplerTest.java  | 34 ++++------
 .../rng/sampling/distribution/LevySamplerTest.java | 10 ++-
 .../distribution/LogNormalSamplerTest.java         | 15 ++---
 .../MarsagliaNormalisedGaussianSamplerTest.java    |  5 +-
 .../MarsagliaTsangWangDiscreteSamplerTest.java     |  9 ++-
 .../distribution/PoissonSamplerCacheTest.java      |  8 +--
 .../sampling/distribution/PoissonSamplerTest.java  |  7 +--
 .../RejectionInversionZipfSamplerTest.java         | 16 ++---
 .../rng/sampling/distribution/SamplerBaseTest.java |  8 +--
 .../distribution/SmallMeanPoissonSamplerTest.java  |  9 ++-
 .../sampling/distribution/StableSamplerTest.java   | 18 +++---
 .../rng/sampling/distribution/TSamplerTest.java    | 11 ++--
 .../distribution/UniformLongSamplerTest.java       | 22 +++----
 .../ZigguratNormalizedGaussianSamplerTest.java     |  9 ++-
 .../sampling/distribution/ZigguratSamplerTest.java | 24 +++----
 .../commons/rng/sampling/shape/BoxSamplerTest.java | 30 ++++-----
 .../rng/sampling/shape/LineSamplerTest.java        | 30 ++++-----
 .../rng/sampling/shape/TetrahedronSamplerTest.java | 30 ++++-----
 .../rng/sampling/shape/TriangleSamplerTest.java    | 34 +++++-----
 .../rng/sampling/shape/UnitBallSamplerTest.java    | 17 +++--
 50 files changed, 389 insertions(+), 433 deletions(-)

diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
index 1dbd7ca9..2963d5a4 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
@@ -20,11 +20,9 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
-
+import org.apache.commons.rng.UniformRandomProvider;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
 
 /**
  * Tests for {@link CollectionSampler}.
@@ -51,7 +49,7 @@ class CollectionSamplerTest {
 
     @Test
     void testSamplePrecondition() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for empty collection.
         final List<String> empty = Collections.emptyList();
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -63,8 +61,8 @@ class CollectionSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final List<String> list = Arrays.asList("Apache", "Commons", "RNG");
         final CollectionSampler<String> sampler1 =
             new CollectionSampler<>(rng1, list);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
index 58826319..f8b1784e 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
@@ -17,23 +17,19 @@
 package org.apache.commons.rng.sampling;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.math3.util.CombinatoricsUtils;
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests for {@link CombinationSampler}.
  */
 class CombinationSamplerTest {
-    private final UniformRandomProvider rng = RandomAssert.createRNG();
-
     @Test
     void testSampleIsInDomain() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final int n = 6;
         for (int k = 1; k <= n; k++) {
             final CombinationSampler sampler = new CombinationSampler(rng, n, k);
@@ -60,6 +56,7 @@ class CombinationSamplerTest {
 
     @Test
     void testSampleWhenNequalsKIsNotShuffled() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Check n == k boundary case.
         // This is allowed but the sample is not shuffled.
         for (int n = 1; n < 3; n++) {
@@ -75,6 +72,7 @@ class CombinationSamplerTest {
 
     @Test
     void testKgreaterThanNThrows() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k > n.
         final int n = 2;
         final int k = 3;
@@ -84,6 +82,7 @@ class CombinationSamplerTest {
 
     @Test
     void testNequalsZeroThrows() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for n = 0.
         final int n = 0;
         final int k = 3;
@@ -93,6 +92,7 @@ class CombinationSamplerTest {
 
     @Test
     void testKequalsZeroThrows() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k = 0.
         final int n = 2;
         final int k = 0;
@@ -102,6 +102,7 @@ class CombinationSamplerTest {
 
     @Test
     void testNisNegativeThrows() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for n <= 0.
         final int n = -1;
         final int k = 3;
@@ -111,6 +112,7 @@ class CombinationSamplerTest {
 
     @Test
     void testKisNegativeThrows() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k <= 0.
         final int n = 0;
         final int k = -1;
@@ -123,8 +125,8 @@ class CombinationSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final int n = 17;
         final int k = 3;
         final CombinationSampler sampler1 =
@@ -171,6 +173,7 @@ class CombinationSamplerTest {
         final long[] observed = new long[codes];
         final int numSamples = 6000;
 
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final CombinationSampler sampler = new CombinationSampler(rng, n, k);
         for (int i = 0; i < numSamples; i++) {
             observed[findCode(codeLookup, sampler.sample())]++;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CompositeSamplersTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CompositeSamplersTest.java
index 87a62a76..5c6601d7 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CompositeSamplersTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CompositeSamplersTest.java
@@ -19,9 +19,6 @@ package org.apache.commons.rng.sampling;
 
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.CompositeSamplers.Builder;
@@ -35,7 +32,8 @@ import org.apache.commons.rng.sampling.distribution.LongSampler;
 import org.apache.commons.rng.sampling.distribution.SharedStateContinuousSampler;
 import org.apache.commons.rng.sampling.distribution.SharedStateDiscreteSampler;
 import org.apache.commons.rng.sampling.distribution.SharedStateLongSampler;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test class for {@link CompositeSamplers}.
@@ -46,17 +44,20 @@ class CompositeSamplersTest {
      */
     @Test
     void testDiscreteProbabilitySampler() {
-        final UniformRandomProvider rng = RandomSource.MWC_256.create(78979L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final double[] probabilities = {0.1, 0.2, 0.3, 0.4};
-        final double mean = 0.2 + 2 * 0.3 + 3 * 0.4;
+
+        final ChiSquareTest chisq = new ChiSquareTest();
+
         final int n = 1000000;
         for (final DiscreteProbabilitySampler item : DiscreteProbabilitySampler.values()) {
             final DiscreteSampler sampler = item.create(rng, probabilities.clone());
-            long sum = 0;
+            final long[] observed = new long[probabilities.length];
             for (int i = 0; i < n; i++) {
-                sum += sampler.sample();
+                observed[sampler.sample()]++;
             }
-            Assertions.assertEquals(mean, (double) sum / n, 1e-3, item::name);
+            final double p = chisq.chiSquareTest(probabilities, observed);
+            Assertions.assertFalse(p < 0.001, () -> item + " p-value too small: " + p);
         }
     }
 
@@ -65,7 +66,7 @@ class CompositeSamplersTest {
      */
     @Test
     void testEmptyBuilderThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final Builder<SharedStateObjectSampler<Integer>> builder = CompositeSamplers
                 .newSharedStateObjectSamplerBuilder();
         Assertions.assertEquals(0, builder.size());
@@ -89,7 +90,7 @@ class CompositeSamplersTest {
      */
     @Test
     void testInvalidWeights() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final Builder<SharedStateObjectSampler<Integer>> builder = CompositeSamplers
                 .newSharedStateObjectSamplerBuilder();
         final RangeSampler sampler = new RangeSampler(45, 63, rng);
@@ -111,7 +112,7 @@ class CompositeSamplersTest {
      */
     @Test
     void testSingleSharedStateObjectSampler() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final Builder<SharedStateObjectSampler<Integer>> builder = CompositeSamplers
                 .newSharedStateObjectSamplerBuilder();
         final RangeSampler sampler = new RangeSampler(45, 63, rng);
@@ -127,7 +128,7 @@ class CompositeSamplersTest {
     @Test
     void testObjectSamplerSamples() {
         final Builder<ObjectSampler<Integer>> builder = CompositeSamplers.newObjectSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.PCG_XSH_RR_32_OS.create(345);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 15;
         final int min = -134;
         final int max = 2097;
@@ -142,13 +143,13 @@ class CompositeSamplersTest {
     void testSharedStateObjectSamplerSamples() {
         final Builder<SharedStateObjectSampler<Integer>> builder = CompositeSamplers
                 .newSharedStateObjectSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.PCG_XSH_RS_32_OS.create(299);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 11;
         final int min = 42;
         final int max = 678;
         addObjectSamplers(builder, n, min, max, rng);
         // Exercise the shared state interface
-        final UniformRandomProvider rng1 = RandomSource.XO_SHI_RO_256_PLUS.create(0x9a8c6f5e);
+        final UniformRandomProvider rng1 = RandomAssert.createRNG();
         assertObjectSamplerSamples(builder.build(rng).withUniformRandomProvider(rng1), min, max);
     }
 
@@ -169,14 +170,14 @@ class CompositeSamplersTest {
                 return AliasMethodDiscreteSampler.of(rng, probabilities, 2);
             }
         });
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_128_PP.create(0xa6b7c9);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 7;
         final int min = -610;
         final int max = 745;
         addObjectSamplers(builder, n, min, max, rng);
 
         // Exercise the shared state interface
-        final UniformRandomProvider rng1 = RandomSource.XO_SHI_RO_256_PLUS.create(0x1f2e3d);
+        final UniformRandomProvider rng1 = RandomAssert.createRNG();
         assertObjectSamplerSamples(builder.build(rng).withUniformRandomProvider(rng1), min, max);
 
         Assertions.assertEquals(1, factoryCount.get(), "Factory should not be used to create the shared state sampler");
@@ -207,7 +208,7 @@ class CompositeSamplersTest {
                 };
             }
         });
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_128_PP.create(0x263478628L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 14;
         final int min = 56;
         final int max = 2033;
@@ -215,7 +216,7 @@ class CompositeSamplersTest {
 
         // Exercise the shared state interface.
         // This tests the custom factory is used twice.
-        final UniformRandomProvider rng1 = RandomSource.XO_SHI_RO_256_PLUS.create(0x8c7b6a);
+        final UniformRandomProvider rng1 = RandomAssert.createRNG();
         assertObjectSamplerSamples(builder.build(rng).withUniformRandomProvider(rng1), min, max);
 
         Assertions.assertEquals(2, factoryCount.get(), "Factory should be used to create the shared state sampler");
@@ -230,7 +231,7 @@ class CompositeSamplersTest {
     @Test
     void testObjectSamplerSamplesWithUniformWeights() {
         final Builder<ObjectSampler<Integer>> builder = CompositeSamplers.newObjectSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.JSF_64.create(678345);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int max = 60;
         final int interval = 10;
         for (int min = 0; min < max; min += interval) {
@@ -247,7 +248,7 @@ class CompositeSamplersTest {
     @Test
     void testObjectSamplerSamplesWithVeryLargeWeights() {
         final Builder<ObjectSampler<Integer>> builder = CompositeSamplers.newObjectSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.SFC_64.create(267934293);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         // Ratio 4:4:2:1
         // The weights will sum to infinity as they are more than 2^1024.
         final double w4 = 0x1.0p1023;
@@ -270,7 +271,7 @@ class CompositeSamplersTest {
     @Test
     void testObjectSamplerSamplesWithSubNormalWeights() {
         final Builder<ObjectSampler<Integer>> builder = CompositeSamplers.newObjectSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.MSWS.create(6786);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         // Ratio 4:4:2:1
         // The weights are very small sub-normal numbers
         final double w4 = Double.MIN_VALUE * 4;
@@ -362,7 +363,7 @@ class CompositeSamplersTest {
     @Test
     void testDiscreteSamplerSamples() {
         final Builder<DiscreteSampler> builder = CompositeSamplers.newDiscreteSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.PCG_XSH_RR_32_OS.create(345);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 15;
         final int min = -134;
         final int max = 2097;
@@ -376,7 +377,7 @@ class CompositeSamplersTest {
     @Test
     void testSharedStateDiscreteSamplerSamples() {
         final Builder<SharedStateDiscreteSampler> builder = CompositeSamplers.newSharedStateDiscreteSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.PCG_XSH_RS_32_OS.create(299);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 11;
         final int min = 42;
         final int max = 678;
@@ -456,7 +457,7 @@ class CompositeSamplersTest {
     @Test
     void testContinuousSamplerSamples() {
         final Builder<ContinuousSampler> builder = CompositeSamplers.newContinuousSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_256_PP.create(9283756);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 15;
         final double min = 67.2;
         final double max = 2033.8;
@@ -471,7 +472,7 @@ class CompositeSamplersTest {
     void testSharedStateContinuousSamplerSamples() {
         final Builder<SharedStateContinuousSampler> builder = CompositeSamplers
                 .newSharedStateContinuousSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.PCG_RXS_M_XS_64_OS.create(0x567567345L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 11;
         final double min = -15.7;
         final double max = 123.4;
@@ -553,7 +554,7 @@ class CompositeSamplersTest {
     @Test
     void testLongSamplerSamples() {
         final Builder<LongSampler> builder = CompositeSamplers.newLongSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.KISS.create(67842321783L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 15;
         final long min = -134;
         final long max = 1L << 54;
@@ -567,7 +568,7 @@ class CompositeSamplersTest {
     @Test
     void testSharedStateLongSamplerSamples() {
         final Builder<SharedStateLongSampler> builder = CompositeSamplers.newSharedStateLongSamplerBuilder();
-        final UniformRandomProvider rng = RandomSource.KISS.create(12369279382030L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = 11;
         final long min = 42;
         final long max = 1L << 53;
@@ -669,8 +670,8 @@ class CompositeSamplersTest {
      * support a shared stated sampler.
      */
     private static void testSharedStateObjectSampler(boolean customFactory) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         final Builder<SharedStateObjectSampler<Integer>> builder = CompositeSamplers
                 .newSharedStateObjectSamplerBuilder();
@@ -718,8 +719,8 @@ class CompositeSamplersTest {
      * support a shared stated sampler.
      */
     private static void testSharedStateDiscreteSampler(boolean customFactory) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         final Builder<SharedStateDiscreteSampler> builder = CompositeSamplers.newSharedStateDiscreteSamplerBuilder();
 
@@ -766,8 +767,8 @@ class CompositeSamplersTest {
      * support a shared stated sampler.
      */
     private static void testSharedStateContinuousSampler(boolean customFactory) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         final Builder<SharedStateContinuousSampler> builder = CompositeSamplers
                 .newSharedStateContinuousSamplerBuilder();
@@ -838,8 +839,8 @@ class CompositeSamplersTest {
      * support a shared stated sampler.
      */
     private static void testSharedStateLongSampler(boolean customFactory) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         final Builder<SharedStateLongSampler> builder = CompositeSamplers.newSharedStateLongSamplerBuilder();
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
index c1b2c578..2ad92481 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
@@ -22,11 +22,9 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-
+import org.apache.commons.rng.UniformRandomProvider;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
 
 /**
  * Test class for {@link DiscreteProbabilityCollectionSampler}.
@@ -137,8 +135,8 @@ class DiscreteProbabilityCollectionSamplerTest {
 
     @Test
     void testSampleUsingMap() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final List<Integer> items = Arrays.asList(1, 3, 4, 6, 9);
         final double[] probabilities = {0.1, 0.2, 0.3, 0.4, 0.5};
         final DiscreteProbabilityCollectionSampler<Integer> sampler1 =
@@ -200,8 +198,8 @@ class DiscreteProbabilityCollectionSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final List<Double> items = Arrays.asList(1d, 2d, 3d, 4d);
         final DiscreteProbabilityCollectionSampler<Double> sampler1 =
             new DiscreteProbabilityCollectionSampler<>(rng1,
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
index 68e036ef..e8ea50be 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
@@ -16,30 +16,23 @@
  */
 package org.apache.commons.rng.sampling;
 
-import java.util.Set;
-import java.util.function.Supplier;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
+import java.util.Set;
+import java.util.function.Supplier;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests for {@link ListSampler}.
  */
 class ListSamplerTest {
-    private final UniformRandomProvider rng = RandomSource.ISAAC.create(6543432321L);
-    private final ChiSquareTest chiSquareTest = new ChiSquareTest();
-
     @Test
     void testSample() {
         final String[][] c = {{"0", "1"}, {"0", "2"}, {"0", "3"}, {"0", "4"},
@@ -62,11 +55,13 @@ class ListSamplerTest {
             sets.add(hs);
         }
 
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         for (int i = 0; i < 1000; i++) {
             observed[findSample(sets, ListSampler.sample(rng, new ArrayList<>(cPop), 2))]++;
         }
 
         // Pass if we cannot reject null hypothesis that distributions are the same.
+        final ChiSquareTest chiSquareTest = new ChiSquareTest();
         Assertions.assertFalse(chiSquareTest.chiSquareTest(expected, observed, 0.001));
     }
 
@@ -76,6 +71,7 @@ class ListSamplerTest {
         final List<String> list = new ArrayList<>();
         list.add("one");
 
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final List<String> one = ListSampler.sample(rng, list, 1);
         Assertions.assertEquals(1, one.size());
         Assertions.assertTrue(one.contains("one"));
@@ -86,6 +82,7 @@ class ListSamplerTest {
         // Must fail for sample size > collection size.
         final List<String> list = new ArrayList<>();
         list.add("one");
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> ListSampler.sample(rng, list, 2));
     }
@@ -94,12 +91,14 @@ class ListSamplerTest {
     void testSamplePrecondition2() {
         // Must fail for empty collection.
         final List<String> list = new ArrayList<>();
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> ListSampler.sample(rng, list, 1));
     }
 
     @Test
     void testShuffle() {
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             orig.add((i + 1) * rng.nextInt());
@@ -120,6 +119,7 @@ class ListSamplerTest {
 
     @Test
     void testShuffleTail() {
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             orig.add((i + 1) * rng.nextInt());
@@ -138,6 +138,7 @@ class ListSamplerTest {
 
     @Test
     void testShuffleHead() {
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             orig.add((i + 1) * rng.nextInt());
@@ -161,6 +162,7 @@ class ListSamplerTest {
      */
     @Test
     void testShuffleMatchesPermutationSamplerShuffle() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             orig.add((i + 1) * rng.nextInt());
@@ -177,6 +179,7 @@ class ListSamplerTest {
      */
     @Test
     void testShuffleMatchesPermutationSamplerShuffleDirectional() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             orig.add((i + 1) * rng.nextInt());
@@ -194,6 +197,7 @@ class ListSamplerTest {
      */
     @Test
     void testShuffleWithSmallLinkedList() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final int size = 3;
         final List<Integer> orig = new ArrayList<>();
         for (int i = 0; i < size; i++) {
@@ -260,9 +264,8 @@ class ListSamplerTest {
         }
 
         // Identical RNGs
-        final long seed = RandomSource.createLong();
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(seed);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(seed);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         ListSampler.shuffle(rng1, list);
         PermutationSampler.shuffle(rng2, array);
@@ -283,8 +286,8 @@ class ListSamplerTest {
      * (if {@code true}) of the array.
      */
     private static void assertShuffleMatchesPermutationSamplerShuffle(List<Integer> list,
-                                                                    int start,
-                                                                    boolean towardHead) {
+                                                                      int start,
+                                                                      boolean towardHead) {
         final int[] array = new int[list.size()];
         ListIterator<Integer> it = list.listIterator();
         for (int i = 0; i < array.length; i++) {
@@ -292,9 +295,8 @@ class ListSamplerTest {
         }
 
         // Identical RNGs
-        final long seed = RandomSource.createLong();
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(seed);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(seed);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         ListSampler.shuffle(rng1, list, start, towardHead);
         PermutationSampler.shuffle(rng2, array, start, towardHead);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
index 0987ab90..9f98668a 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
@@ -17,27 +17,20 @@
 package org.apache.commons.rng.sampling;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests for {@link PermutationSampler}.
  */
 class PermutationSamplerTest {
-    private final UniformRandomProvider rng = RandomSource.ISAAC.create(1232343456L);
-    private final ChiSquareTest chiSquareTest = new ChiSquareTest();
-
     @Test
     void testSampleTrivial() {
         final int n = 6;
         final int k = 3;
-        final PermutationSampler sampler = new PermutationSampler(RandomAssert.createRNG(),
+        final PermutationSampler sampler = new PermutationSampler(RandomAssert.seededRNG(),
                                                                   n, k);
         final int[] random = sampler.sample();
         SAMPLE: for (final int s : random) {
@@ -75,6 +68,7 @@ class PermutationSamplerTest {
 
     @Test
     void testSampleBoundaryCase() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Check size = 1 boundary case.
         final PermutationSampler sampler = new PermutationSampler(rng, 1, 1);
         final int[] perm = sampler.sample();
@@ -84,6 +78,7 @@ class PermutationSamplerTest {
 
     @Test
     void testSamplePrecondition1() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k > n.
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new PermutationSampler(rng, 2, 3));
@@ -91,6 +86,7 @@ class PermutationSamplerTest {
 
     @Test
     void testSamplePrecondition2() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for n = 0.
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new PermutationSampler(rng, 0, 0));
@@ -98,6 +94,7 @@ class PermutationSamplerTest {
 
     @Test
     void testSamplePrecondition3() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k < n < 0.
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new PermutationSampler(rng, -1, 0));
@@ -105,6 +102,7 @@ class PermutationSamplerTest {
 
     @Test
     void testSamplePrecondition4() {
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // Must fail for k < n < 0.
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new PermutationSampler(rng, 1, -1));
@@ -131,6 +129,7 @@ class PermutationSamplerTest {
     void testShuffleNoDuplicates() {
         final int n = 100;
         final int[] orig = PermutationSampler.natural(n);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         PermutationSampler.shuffle(rng, orig);
 
         // Test that all (unique) entries exist in the shuffled array.
@@ -149,6 +148,7 @@ class PermutationSamplerTest {
         final int[] orig = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
         final int[] list = orig.clone();
         final int start = 4;
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         PermutationSampler.shuffle(rng, list, start, false);
 
         // Ensure that all entries below index "start" did not move.
@@ -172,6 +172,7 @@ class PermutationSamplerTest {
         final int[] orig = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
         final int[] list = orig.clone();
         final int start = 4;
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         PermutationSampler.shuffle(rng, list, start, true);
 
         // Ensure that all entries above index "start" did not move.
@@ -195,8 +196,8 @@ class PermutationSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final int n = 17;
         final int k = 13;
         final PermutationSampler sampler1 =
@@ -217,12 +218,14 @@ class PermutationSamplerTest {
         final double[] expected = new double[len];
         Arrays.fill(expected, numExpected);
 
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final PermutationSampler sampler = new PermutationSampler(rng, n, k);
         for (int i = 0; i < numSamples; i++) {
             observed[findPerm(p, sampler.sample())]++;
         }
 
         // Pass if we cannot reject null hypothesis that distributions are the same.
+        final ChiSquareTest chiSquareTest = new ChiSquareTest();
         Assertions.assertFalse(chiSquareTest.chiSquareTest(expected, observed, 0.001));
     }
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
index c63ea9c8..616ca225 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
@@ -20,6 +20,8 @@ package org.apache.commons.rng.sampling;
 import org.junit.jupiter.api.Assertions;
 import java.util.EnumSet;
 import java.util.concurrent.ThreadLocalRandom;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
 import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
@@ -32,6 +34,15 @@ import org.apache.commons.rng.simple.RandomSource;
 public final class RandomAssert {
     /** Number of samples to generate to test for equal sequences. */
     private static final int SAMPLES = 10;
+    /** Default seed for the default generator. */
+    private static final Long DEFAULT_SEED;
+
+    static {
+        DEFAULT_SEED = Long.valueOf(RandomSource.createLong());
+        // Record this to allow debugging of tests that failed with the seeded generator
+        Logger.getLogger(RandomAssert.class.getName()).log(Level.INFO,
+            () -> "Default seed: " + DEFAULT_SEED);
+    }
 
     /** The sources for a new random generator instance. */
     private static final RandomSource[] SOURCES;
@@ -163,10 +174,45 @@ public final class RandomAssert {
      * test that is flaky when using this method may require an update to the test
      * assumptions and assertions.
      *
+     * <p>It should be noted that repeat invocations of a failing test by the surefire plugin
+     * will receive different instance.
+     *
      * @return the uniform random provider
      * @see RandomSource#create()
      */
     public static UniformRandomProvider createRNG() {
         return SOURCES[ThreadLocalRandom.current().nextInt(SOURCES.length)].create();
     }
+
+    /**
+     * Create a new random generator instance with a fixed seed. The implementation is a
+     * high-quality generator with a low construction cost. The seed is expected to be
+     * different between invocations of the Java Virtual Machine.
+     *
+     * <p>This is a helper method to return a generator for use in testing where the
+     * underlying source should not impact the test. This ensures the test is robust upon
+     * repeat invocation across different JVM instances where the generator will most
+     * likely be different.
+     *
+     * <p>Note that use of this method is preferable to use of a fixed seed generator as it provides
+     * a single entry point to update tests that use a deterministic output from a RNG.
+     *
+     * <p>This method should be used in preference to {@link RandomAssert#createRNG()} when:
+     * <ul>
+     *  <li>the test requires multiple instances of a generator with the same output
+     *  <li>the test requires a functioning generator but the output is not of consequence
+     * </ul>
+     *
+     * <p>It should be noted that repeat invocations of a failing test by the surefire plugin
+     * will receive an instance with the same seed. If a test may fail due to stochastic conditions
+     * then consider using {@link RandomAssert#createRNG()} which will obtain a different RNG
+     * for repeat test executions.
+     *
+     * @return the uniform random provider
+     * @see RandomSource#create()
+     * @see #createRNG()
+     */
+    public static UniformRandomProvider seededRNG() {
+        return RandomSource.SPLIT_MIX_64.create(DEFAULT_SEED);
+    }
 }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
index 1906e8f9..8072050a 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
@@ -16,13 +16,12 @@
  */
 package org.apache.commons.rng.sampling;
 
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.apache.commons.rng.simple.RandomSource;
 import java.util.Arrays;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link UnitSphereSampler}.
@@ -71,7 +70,7 @@ class UnitSphereSamplerTest {
      * RNG-130: All samples should be 1 or -1.
      */
     private static void testDistribution1D(boolean factoryConstructor) {
-        final UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create(0x1a2b3cL);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UnitSphereSampler generator = createUnitSphereSampler(1, rng, factoryConstructor);
         final int samples = 10000;
         // Count the negatives.
@@ -142,7 +141,7 @@ class UnitSphereSamplerTest {
      * Obtains polar coordinates and checks the angle distribution is uniform.
      */
     private static void testDistribution2D(boolean factoryConstructor) {
-        final UniformRandomProvider rng = RandomSource.XOR_SHIFT_1024_S_PHI.create(17399225432L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UnitSphereSampler generator = createUnitSphereSampler(2, rng, factoryConstructor);
 
         // In 2D, angles with a given vector should be uniformly distributed.
@@ -185,7 +184,7 @@ class UnitSphereSamplerTest {
      * Obtains spherical coordinates and checks the distribution is uniform.
      */
     private static void testDistribution3D(boolean factoryConstructor) {
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_256_PP.create(0xabcdefL);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UnitSphereSampler generator = createUnitSphereSampler(3, rng, factoryConstructor);
 
         // Get 3D spherical coordinates. Assign to a bin.
@@ -237,7 +236,7 @@ class UnitSphereSamplerTest {
      * Checks the surface of the 3-sphere can be used to generate uniform samples within a circle.
      */
     private static void testDistribution4D(boolean factoryConstructor) {
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_512_PP.create(0x9876543210L);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UnitSphereSampler generator = createUnitSphereSampler(4, rng, factoryConstructor);
 
         // No uniform distribution of spherical coordinates for a 3-sphere.
@@ -525,8 +524,8 @@ class UnitSphereSamplerTest {
      * @param factoryConstructor true to use the factory constructor
      */
     private static void testSharedStateSampler(int dimension, boolean factoryConstructor) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final UnitSphereSampler sampler1 = createUnitSphereSampler(dimension, rng1, factoryConstructor);
         final UnitSphereSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
index 0496f9d8..815a1761 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
@@ -17,11 +17,9 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import java.time.Duration;
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -34,8 +32,7 @@ class AhrensDieterExponentialSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroMean() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mean = 0;
         Assertions.assertThrows(IllegalArgumentException.class, () -> AhrensDieterExponentialSampler.of(rng, mean));
     }
@@ -45,8 +42,8 @@ class AhrensDieterExponentialSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double mean = 1.23;
         final SharedStateContinuousSampler sampler1 =
             AhrensDieterExponentialSampler.of(rng1, mean);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
index 2b562455..42e57a28 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
@@ -16,10 +16,8 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -32,8 +30,7 @@ class AhrensDieterMarsagliaTsangGammaSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroAlpha() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double alpha = 0;
         final double theta = 1;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -45,8 +42,7 @@ class AhrensDieterMarsagliaTsangGammaSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroTheta() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double alpha = 1;
         final double theta = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -76,8 +72,8 @@ class AhrensDieterMarsagliaTsangGammaSamplerTest {
      * @param theta Theta.
      */
     private static void testSharedStateSampler(double alpha, double theta) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use instance constructor not factory constructor to exercise 1.X public API
         final AhrensDieterMarsagliaTsangGammaSampler sampler1 =
             new AhrensDieterMarsagliaTsangGammaSampler(rng1, alpha, theta);
@@ -91,7 +87,7 @@ class AhrensDieterMarsagliaTsangGammaSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertTrue(new AhrensDieterMarsagliaTsangGammaSampler(rng, 1.0, 2.0).toString()
                 .toLowerCase().contains("gamma"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
index 86f8553a..ca3b14b5 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
@@ -16,17 +16,15 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
+import java.util.Arrays;
 import org.apache.commons.math3.distribution.BinomialDistribution;
 import org.apache.commons.math3.distribution.PoissonDistribution;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-import java.util.Arrays;
-
 /**
  * Test for the {@link AliasMethodDiscreteSampler}.
  */
@@ -276,8 +274,8 @@ class AliasMethodDiscreteSamplerTest {
      * @param probabilities The probabilities
      */
     private static void testSharedStateSampler(double[] probabilities) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use negative alpha to disable padding
         final SharedStateDiscreteSampler sampler1 =
             AliasMethodDiscreteSampler.of(rng1, probabilities, -1);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
index 7831f0ac..5ebd94e7 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link BoxMullerGaussianSampler}. The tests hit edge cases for the sampler.
@@ -31,8 +31,7 @@ class BoxMullerGaussianSamplerTest {
     @SuppressWarnings({"deprecation"})
     @Test
     void testConstructorThrowsWithZeroStandardDeviation() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mean = 1;
         final double standardDeviation = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
index ccf6718d..8fc9083b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link BoxMullerLogNormalSampler}. The tests hit edge cases for the sampler.
@@ -31,8 +31,7 @@ class BoxMullerLogNormalSamplerTest {
     @SuppressWarnings({"deprecation"})
     @Test
     void testConstructorThrowsWithZeroShape() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mu = 1;
         final double sigma = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerNormalisedGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerNormalisedGaussianSamplerTest.java
index c65a8c8c..857ed209 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerNormalisedGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerNormalisedGaussianSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Test;
 
 /**
@@ -30,8 +29,8 @@ class BoxMullerNormalisedGaussianSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateContinuousSampler sampler1 =
             BoxMullerNormalizedGaussianSampler.<BoxMullerNormalizedGaussianSampler>of(rng1);
         final SharedStateContinuousSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
index 8c31206e..a1c4f026 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
@@ -16,10 +16,8 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -32,8 +30,7 @@ class ChengBetaSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroAlpha() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double alpha = 0;
         final double beta = 1;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -45,8 +42,7 @@ class ChengBetaSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroBeta() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double alpha = 1;
         final double beta = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -92,8 +88,8 @@ class ChengBetaSamplerTest {
      * @param beta Beta.
      */
     private static void testSharedStateSampler(double alpha, double beta) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use instance constructor not factory constructor to exercise 1.X public API
         final SharedStateContinuousSampler sampler1 =
             new ChengBetaSampler(rng1, alpha, beta);
@@ -107,7 +103,7 @@ class ChengBetaSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertTrue(new ChengBetaSampler(rng, 1.0, 2.0).toString()
                 .toLowerCase().contains("beta"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
index 751210f5..d293b569 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
@@ -16,11 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
-import java.util.ArrayList;
-
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.MethodSource;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
index ac363592..c3e81fac 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
@@ -16,10 +16,9 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Collections;
-
+import java.util.List;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
index 5f9f7e3e..cf84463d 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
@@ -19,7 +19,6 @@ package org.apache.commons.rng.sampling.distribution;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -94,7 +93,7 @@ class ContinuousUniformSamplerTest {
      */
     @Test
     void testInvalidOpenIntervalThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         for (final double[] interval : new double[][] {
             // Opposite signs. Require two doubles inside the range.
             {-0.0, 0.0},
@@ -131,7 +130,7 @@ class ContinuousUniformSamplerTest {
      */
     @Test
     void testTinyOpenIntervalSample() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
 
         // Test sub-normal ranges
         final double x = Double.MIN_VALUE;
@@ -207,8 +206,8 @@ class ContinuousUniformSamplerTest {
     void testSamplerWithBoundsExcluded() {
         // SplitMix64 only returns zero once in the output. Seeded with zero it outputs zero
         // at the end of the period.
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double low = 1.23;
         final double high = 4.56;
         final SharedStateContinuousSampler sampler1 =
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
index db6ca875..b79dba1a 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
 import java.util.Arrays;
 import org.apache.commons.math3.linear.Array2DRowRealMatrix;
 import org.apache.commons.math3.stat.correlation.Covariance;
@@ -26,6 +24,8 @@ import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link DirichletSampler}.
@@ -33,56 +33,56 @@ import org.apache.commons.rng.simple.RandomSource;
 class DirichletSamplerTest {
     @Test
     void testDistributionThrowsWithInvalidNumberOfCategories() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.of(rng, 1.0));
     }
 
     @Test
     void testDistributionThrowsWithZeroConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.of(rng, 1.0, 0.0));
     }
 
     @Test
     void testDistributionThrowsWithNaNConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.of(rng, 1.0, Double.NaN));
     }
 
     @Test
     void testDistributionThrowsWithInfiniteConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.of(rng, 1.0, Double.POSITIVE_INFINITY));
     }
 
     @Test
     void testSymmetricDistributionThrowsWithInvalidNumberOfCategories() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
                 () -> DirichletSampler.symmetric(rng, 1, 1.0));
     }
 
     @Test
     void testSymmetricDistributionThrowsWithZeroConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.symmetric(rng, 2, 0.0));
     }
 
     @Test
     void testSymmetricDistributionThrowsWithNaNConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.symmetric(rng, 2, Double.NaN));
     }
 
     @Test
     void testSymmetricDistributionThrowsWithInfiniteConcentration() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DirichletSampler.symmetric(rng, 2, Double.POSITIVE_INFINITY));
     }
@@ -153,7 +153,7 @@ class DirichletSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final DirichletSampler sampler1 = DirichletSampler.symmetric(rng, 2, 1.0);
         final DirichletSampler sampler2 = DirichletSampler.of(rng, 0.5, 1, 1.5);
         Assertions.assertTrue(sampler1.toString().toLowerCase().contains("dirichlet"));
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
index cafe3cbc..a972464a 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
@@ -16,16 +16,14 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.ArrayList;
-
+import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.MethodSource;
 
-import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 /**
  * Tests for random deviates generators.
  */
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
index fe36b65c..0db0e500 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
@@ -16,12 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Collections;
-
+import java.util.List;
 import org.apache.commons.math3.util.MathArrays;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
index 69eefccf..16cdaa4b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
+import java.util.Locale;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source32.IntProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
@@ -23,8 +24,6 @@ import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-import java.util.Locale;
-
 /**
  * Test for the {@link DiscreteUniformSampler}. The tests hit edge cases for the sampler
  * and demonstrates uniformity of output when the underlying RNG output is uniform.
@@ -37,7 +36,7 @@ class DiscreteUniformSamplerTest {
     void testConstructorThrowsWithLowerAboveUpper() {
         final int upper = 55;
         final int lower = upper + 1;
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> DiscreteUniformSampler.of(rng, lower, upper));
     }
@@ -61,8 +60,8 @@ class DiscreteUniformSamplerTest {
     void testSamplesWithFullRange() {
         final int upper = Integer.MAX_VALUE;
         final int lower = Integer.MIN_VALUE;
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler = DiscreteUniformSampler.of(rng2, lower, upper);
         for (int i = 0; i < 10; i++) {
             Assertions.assertEquals(rng1.nextInt(), sampler.sample());
@@ -80,8 +79,8 @@ class DiscreteUniformSamplerTest {
         final int upper = 257;
         for (final int lower : new int[] {-13, 0, 13}) {
             final int n = upper - lower + 1;
-            final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-            final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+            final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+            final UniformRandomProvider rng2 = RandomAssert.seededRNG();
             final SharedStateDiscreteSampler sampler = DiscreteUniformSampler.of(rng2, lower, upper);
             for (int i = 0; i < 10; i++) {
                 Assertions.assertEquals(lower + rng1.nextInt(n), sampler.sample());
@@ -138,8 +137,8 @@ class DiscreteUniformSamplerTest {
             // Upper is inclusive so subtract 1
             final int upper = (1 << i) - 1;
             final int shift = 32 - i;
-            final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-            final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+            final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+            final UniformRandomProvider rng2 = RandomAssert.seededRNG();
             sampler = DiscreteUniformSampler.of(rng2, lower, upper);
             for (int j = 0; j < 10; j++) {
                 Assertions.assertEquals(rng1.nextInt() >>> shift, sampler.sample());
@@ -156,8 +155,8 @@ class DiscreteUniformSamplerTest {
         // Create a range bigger than 2^63
         final int upper = Integer.MAX_VALUE / 2 + 1;
         final int lower = Integer.MIN_VALUE / 2 - 1;
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler = DiscreteUniformSampler.of(rng2, lower, upper);
         for (int i = 0; i < 10; i++) {
             // Get the expected value by the rejection method
@@ -360,8 +359,8 @@ class DiscreteUniformSamplerTest {
      * @param upper Upper.
      */
     private static void testSharedStateSampler(int lower, int upper) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use instance constructor not factory constructor to exercise 1.X public API
         final SharedStateDiscreteSampler sampler1 =
             new DiscreteUniformSampler(rng1, lower, upper);
@@ -398,7 +397,7 @@ class DiscreteUniformSamplerTest {
      * @param upper Upper.
      */
     private static void assertToString(int lower, int upper) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final DiscreteUniformSampler sampler = new DiscreteUniformSampler(rng, lower, upper);
         Assertions.assertTrue(sampler.toString().toLowerCase(Locale.US).contains("uniform"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
index b130f565..e444c6e5 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
@@ -454,8 +454,8 @@ class FastLoadedDiceRollerDiscreteSamplerTest {
     @ParameterizedTest
     @MethodSource
     void testSharedStateSampler(long[] frequencies) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler1 =
             FastLoadedDiceRollerDiscreteSampler.of(rng1, frequencies);
         final SharedStateDiscreteSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
index 3299c7c6..3627cac7 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
@@ -16,13 +16,11 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.sampling.SharedStateSampler;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link GaussianSampler}. The tests hit edge cases for the sampler.
@@ -33,8 +31,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroStandardDeviation() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = ZigguratSampler.NormalizedGaussian.of(rng);
         final double mean = 1;
         final double standardDeviation = 0;
@@ -47,8 +44,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testConstructorThrowsWithInfiniteStandardDeviation() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new ZigguratNormalizedGaussianSampler(rng);
         final double mean = 1;
         final double standardDeviation = Double.POSITIVE_INFINITY;
@@ -61,8 +57,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testConstructorThrowsWithNaNStandardDeviation() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new ZigguratNormalizedGaussianSampler(rng);
         final double mean = 1;
         final double standardDeviation = Double.NaN;
@@ -75,8 +70,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testConstructorThrowsWithInfiniteMean() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new ZigguratNormalizedGaussianSampler(rng);
         final double mean = Double.POSITIVE_INFINITY;
         final double standardDeviation = 1;
@@ -89,8 +83,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testConstructorThrowsWithNaNMean() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new ZigguratNormalizedGaussianSampler(rng);
         final double mean = Double.NaN;
         final double standardDeviation = 1;
@@ -103,8 +96,8 @@ class GaussianSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = ZigguratSampler.NormalizedGaussian.of(rng1);
         final double mean = 1.23;
         final double standardDeviation = 4.56;
@@ -120,7 +113,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testSharedStateSamplerThrowsIfUnderlyingSamplerDoesNotShareState() {
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new NormalizedGaussianSampler() {
             @Override
             public double sample() {
@@ -141,7 +134,7 @@ class GaussianSamplerTest {
      */
     @Test
     void testSharedStateSamplerThrowsIfUnderlyingSamplerReturnsWrongSharedState() {
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new BadSharedStateNormalizedGaussianSampler();
         final double mean = 1.23;
         final double standardDeviation = 4.56;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GeometricSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GeometricSamplerTest.java
index a1c50aac..ff69911b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GeometricSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GeometricSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -32,7 +31,7 @@ class GeometricSamplerTest {
      */
     @Test
     void testProbabilityOfSuccessIsOneGeneratesZeroForSamples() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler = GeometricSampler.of(rng, 1);
         // All samples should be 0
         for (int i = 0; i < 10; i++) {
@@ -55,7 +54,7 @@ class GeometricSamplerTest {
         Assertions.assertTrue(exponentialMean > 0 && exponentialMean <= Double.MAX_VALUE);
         // The internal exponential sampler validates the mean so demonstrate creating a
         // geometric sampler does not throw.
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         GeometricSampler.of(rng, probabilityOfSuccess);
     }
 
@@ -65,7 +64,7 @@ class GeometricSamplerTest {
      */
     @Test
     void testProbabilityOfSuccessIsOneSamplerToString() {
-        final UniformRandomProvider unusedRng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider unusedRng = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler = GeometricSampler.of(unusedRng, 1);
         Assertions.assertTrue(sampler.toString().contains("Geometric"),
             "Missing 'Geometric' from toString");
@@ -82,7 +81,7 @@ class GeometricSamplerTest {
      */
     @Test
     void testProbabilityOfSuccessIsAlmostZeroGeneratesMaxValueForSamples() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler = GeometricSampler.of(rng, Double.MIN_VALUE);
         // All samples should be max value
         for (int i = 0; i < 10; i++) {
@@ -96,7 +95,7 @@ class GeometricSamplerTest {
      */
     @Test
     void testProbabilityOfSuccessAboveOneThrows() {
-        final UniformRandomProvider unusedRng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider unusedRng = RandomAssert.seededRNG();
         final double probabilityOfSuccess = Math.nextUp(1.0);
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> GeometricSampler.of(unusedRng, probabilityOfSuccess));
@@ -107,7 +106,7 @@ class GeometricSamplerTest {
      */
     @Test
     void testProbabilityOfSuccessIsZeroThrows() {
-        final UniformRandomProvider unusedRng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider unusedRng = RandomAssert.seededRNG();
         final double probabilityOfSuccess = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> GeometricSampler.of(unusedRng, probabilityOfSuccess));
@@ -136,8 +135,8 @@ class GeometricSamplerTest {
      * @param probabilityOfSuccess Probability of success.
      */
     private static void testSharedStateSampler(double probabilityOfSuccess) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler1 =
             GeometricSampler.of(rng1, probabilityOfSuccess);
         final SharedStateDiscreteSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
index 0b97d710..19454cbf 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
@@ -21,7 +21,6 @@ import org.apache.commons.math3.distribution.PoissonDistribution;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -83,7 +82,7 @@ class GuideTableDiscreteSamplerTest {
      * @param alpha the alpha
      */
     private static void assertConstructorThrows(double[] probabilities, double alpha) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> GuideTableDiscreteSampler.of(rng, probabilities, alpha));
     }
@@ -228,8 +227,8 @@ class GuideTableDiscreteSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] probabilities = {0.1, 0, 0.2, 0.3, 0.1, 0.3, 0};
         final SharedStateDiscreteSampler sampler1 =
             GuideTableDiscreteSampler.of(rng1, probabilities);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSamplerTest.java
index 325a9804..18f4ee07 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Test;
 
 /**
@@ -37,8 +36,8 @@ class InverseTransformContinuousSamplerTest {
                     return 456.99 * p;
                 }
             };
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateContinuousSampler sampler1 =
             InverseTransformContinuousSampler.of(rng1, function);
         final SharedStateContinuousSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSamplerTest.java
index 73d6e7d3..143606d5 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Test;
 
 /**
@@ -37,8 +36,8 @@ class InverseTransformDiscreteSamplerTest {
                     return (int) Math.round(789 * p);
                 }
             };
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler1 =
             InverseTransformDiscreteSampler.of(rng1, function);
         final SharedStateDiscreteSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
index 6eed29f1..b1fa95a7 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
@@ -16,12 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link InverseTransformParetoSampler}. The tests hit edge cases for the sampler.
@@ -32,8 +30,7 @@ class InverseTransformParetoSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroScale() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double scale = 0;
         final double shape = 1;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -45,8 +42,7 @@ class InverseTransformParetoSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroShape() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double scale = 1;
         final double shape = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -58,8 +54,8 @@ class InverseTransformParetoSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double scale = 1.23;
         final double shape = 4.56;
         final SharedStateContinuousSampler sampler1 =
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
index 51dc06b0..1d2c085b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
@@ -19,7 +19,6 @@ package org.apache.commons.rng.sampling.distribution;
 import org.apache.commons.math3.distribution.PoissonDistribution;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -151,8 +150,8 @@ class KempSmallMeanPoissonSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double mean = 1.23;
         final SharedStateDiscreteSampler sampler1 =
             KempSmallMeanPoissonSampler.of(rng1, mean);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
index 8921ac0c..3c4d5f03 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
@@ -16,12 +16,9 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RandomProviderState;
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.sampling.distribution.LargeMeanPoissonSampler.LargeMeanPoissonSamplerState;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -38,8 +35,7 @@ class LargeMeanPoissonSamplerTest {
      */
     @Test
     void testConstructorThrowsWithMeanLargerThanUpperBound() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mean = Integer.MAX_VALUE / 2 + 1;
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> LargeMeanPoissonSampler.of(rng, mean));
@@ -50,8 +46,7 @@ class LargeMeanPoissonSamplerTest {
      */
     @Test
     void testConstructorThrowsWithMeanBelow1() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mean = Math.nextDown(1);
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> LargeMeanPoissonSampler.of(rng, mean));
@@ -62,8 +57,7 @@ class LargeMeanPoissonSamplerTest {
      */
     @Test
     void testConstructorThrowsWithStateAndNegativeFractionalMean() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final LargeMeanPoissonSamplerState state = new LargeMeanPoissonSampler(rng, 1).getState();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new LargeMeanPoissonSampler(rng, state, -0.1));
@@ -74,8 +68,7 @@ class LargeMeanPoissonSamplerTest {
      */
     @Test
     void testConstructorThrowsWithStateAndNonFractionalMean() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final LargeMeanPoissonSamplerState state = new LargeMeanPoissonSampler(rng, 1).getState();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new LargeMeanPoissonSampler(rng, state, 1.1));
@@ -86,8 +79,7 @@ class LargeMeanPoissonSamplerTest {
      */
     @Test
     void testConstructorThrowsWithStateAndFractionalMeanOne() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final LargeMeanPoissonSamplerState state = new LargeMeanPoissonSampler(rng, 1).getState();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> new LargeMeanPoissonSampler(rng, state, 1));
@@ -102,12 +94,8 @@ class LargeMeanPoissonSamplerTest {
     @Test
     void testCanComputeSameSamplesWhenConstructedWithState() {
         // Two identical RNGs
-        final RestorableUniformRandomProvider rng1 =
-                RandomSource.MWC_256.create();
-        final RandomProviderState state = rng1.saveState();
-        final RestorableUniformRandomProvider rng2 =
-                RandomSource.MWC_256.create();
-        rng2.restoreState(state);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
 
         // The sampler is suitable for mean > 40
         for (int i = 40; i < 44; i++) {
@@ -128,8 +116,8 @@ class LargeMeanPoissonSamplerTest {
      * @param mean  the mean
      */
     private static void testPoissonSamples(
-            final RestorableUniformRandomProvider rng1,
-            final RestorableUniformRandomProvider rng2,
+            final UniformRandomProvider rng1,
+            final UniformRandomProvider rng2,
             double mean) {
         final LargeMeanPoissonSampler s1 = new LargeMeanPoissonSampler(rng1, mean);
         final int n = (int) Math.floor(mean);
@@ -165,8 +153,8 @@ class LargeMeanPoissonSamplerTest {
      * @param mean Mean.
      */
     private static void testSharedStateSampler(double mean) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler1 =
             LargeMeanPoissonSampler.of(rng1, mean);
         final SharedStateDiscreteSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LevySamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LevySamplerTest.java
index 7b47bcb7..d7fe375d 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LevySamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LevySamplerTest.java
@@ -19,8 +19,6 @@ package org.apache.commons.rng.sampling.distribution;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
-
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -33,7 +31,7 @@ class LevySamplerTest {
      */
     @Test
     void testConstructorThrowsWithNegativeScale() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double location = 1;
         final double scale = -1e-6;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -45,7 +43,7 @@ class LevySamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroScale() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double location = 1;
         final double scale = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -57,8 +55,8 @@ class LevySamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double location = 4.56;
         final double scale = 1.23;
         final LevySampler sampler1 = LevySampler.of(rng1, location, scale);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
index 79d143aa..9b70f0ad 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
@@ -16,13 +16,11 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.sampling.SharedStateSampler;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link LogNormalSampler}. The tests hit edge cases for the sampler.
@@ -33,8 +31,7 @@ class LogNormalSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroShape() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = ZigguratSampler.NormalizedGaussian.of(rng);
         final double mu = 1;
         final double sigma = 0;
@@ -47,8 +44,8 @@ class LogNormalSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = ZigguratSampler.NormalizedGaussian.of(rng1);
         // Test a negative mean is allowed (see RNG-166)
         final double mu = -1.23;
@@ -65,7 +62,7 @@ class LogNormalSamplerTest {
      */
     @Test
     void testSharedStateSamplerThrowsIfUnderlyingSamplerDoesNotShareState() {
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new NormalizedGaussianSampler() {
             @Override
             public double sample() {
@@ -86,7 +83,7 @@ class LogNormalSamplerTest {
      */
     @Test
     void testSharedStateSamplerThrowsIfUnderlyingSamplerReturnsWrongSharedState() {
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final NormalizedGaussianSampler gauss = new BadSharedStateNormalizedGaussianSampler();
         final double mu = 1.23;
         final double sigma = 4.56;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalisedGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalisedGaussianSamplerTest.java
index 125faa62..76e82258 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalisedGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalisedGaussianSamplerTest.java
@@ -19,7 +19,6 @@ package org.apache.commons.rng.sampling.distribution;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source32.IntProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -32,8 +31,8 @@ class MarsagliaNormalisedGaussianSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateContinuousSampler sampler1 =
             MarsagliaNormalizedGaussianSampler.<MarsagliaNormalizedGaussianSampler>of(rng1);
         final SharedStateContinuousSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
index 79eda8bf..f8358ac3 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
@@ -21,7 +21,6 @@ import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source32.IntProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -614,8 +613,8 @@ class MarsagliaTsangWangDiscreteSamplerTest {
      * @param prob Probability values.
      */
     private static void testSharedStateSampler(int offset, int[] prob) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         double[] probabilities = createProbabilities(offset, prob);
         final SharedStateDiscreteSampler sampler1 =
                 MarsagliaTsangWangDiscreteSampler.Enumerated.of(rng1, probabilities);
@@ -648,8 +647,8 @@ class MarsagliaTsangWangDiscreteSamplerTest {
      * @param probabilityOfSuccess Probability of success.
      */
     private static void testSharedStateSampler(int trials, double probabilityOfSuccess) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateDiscreteSampler sampler1 =
                 MarsagliaTsangWangDiscreteSampler.Binomial.of(rng1, trials, probabilityOfSuccess);
         final SharedStateDiscreteSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
index 1f099a1f..982caf8b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
@@ -17,6 +17,8 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.RestorableUniformRandomProvider;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
@@ -249,8 +251,7 @@ class PoissonSamplerCacheTest {
      */
     @Test
     void testCreateSharedStateSamplerThrowsWithZeroMean() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final PoissonSamplerCache cache = createPoissonSamplerCache();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> cache.createSharedStateSampler(rng, 0));
@@ -261,8 +262,7 @@ class PoissonSamplerCacheTest {
      */
     @Test
     void testCreateSharedStateSamplerThrowsWithNonIntegerMean() {
-        final RestorableUniformRandomProvider rng =
-                RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final PoissonSamplerCache cache = createPoissonSamplerCache();
         final double mean = Integer.MAX_VALUE + 1.0;
         Assertions.assertThrows(IllegalArgumentException.class,
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerTest.java
index e7d4bc6b..d63122f6 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -50,8 +49,8 @@ class PoissonSamplerTest {
      * @param mean Mean.
      */
     private static void testSharedStateSampler(double mean) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use instance constructor not factory constructor to exercise 1.X public API
         final SharedStateDiscreteSampler sampler1 =
             new PoissonSampler(rng1, mean);
@@ -65,7 +64,7 @@ class PoissonSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertTrue(new PoissonSampler(rng, 1.23).toString().toLowerCase().contains("poisson"));
     }
 }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
index 67f445e5..229eeb15 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
@@ -16,12 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.apache.commons.rng.RestorableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for the {@link RejectionInversionZipfSampler}. The tests hit edge cases for the sampler.
@@ -32,8 +30,7 @@ class RejectionInversionZipfSamplerTest {
      */
     @Test
     void testConstructorThrowsWithZeroNumberOfElements() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final int numberOfElements = 0;
         final double exponent = 1;
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -45,8 +42,7 @@ class RejectionInversionZipfSamplerTest {
      */
     @Test
     void testConstructorThrowsWithNegativeExponent() {
-        final RestorableUniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final int numberOfElements = 1;
         final double exponent = Math.nextDown(0);
         Assertions.assertThrows(IllegalArgumentException.class,
@@ -76,8 +72,8 @@ class RejectionInversionZipfSamplerTest {
      * @param exponent Exponent
      */
     private static void testSharedStateSampler(int numberOfElements, double exponent) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         // Use instance constructor not factory constructor to exercise 1.X public API
         final RejectionInversionZipfSampler sampler1 =
             new RejectionInversionZipfSampler(rng1, numberOfElements, exponent);
@@ -91,7 +87,7 @@ class RejectionInversionZipfSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertTrue(new RejectionInversionZipfSampler(rng, 10, 2.0).toString()
                 .toLowerCase().contains("zipf"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SamplerBaseTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SamplerBaseTest.java
index 6c5063c3..672f2420 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SamplerBaseTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SamplerBaseTest.java
@@ -17,7 +17,7 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -29,8 +29,8 @@ import org.junit.jupiter.api.Test;
 class SamplerBaseTest {
     @Test
     void testNextMethods() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SamplerBase sampler = new SamplerBase(rng2);
         final int n = 256;
         for (int i = 0; i < 3; i++) {
@@ -43,7 +43,7 @@ class SamplerBaseTest {
 
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final SamplerBase sampler = new SamplerBase(rng);
         Assertions.assertTrue(sampler.toString().contains("rng"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
index 6a55e69e..e3dca5a9 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -34,7 +33,7 @@ class SmallMeanPoissonSamplerTest {
     @Test
     void testConstructorThrowsWithMeanThatSetsProbabilityP0ToZero() {
         final UniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+            RandomAssert.seededRNG();
         final double p0 = Double.MIN_VALUE;
         // Note: p0 = Math.exp(-mean) => mean = -Math.log(p0).
         // Add to the limit on the mean to cause p0 to be zero.
@@ -49,7 +48,7 @@ class SmallMeanPoissonSamplerTest {
     @Test
     void testConstructorThrowsWithZeroMean() {
         final UniformRandomProvider rng =
-            RandomSource.SPLIT_MIX_64.create(0L);
+            RandomAssert.seededRNG();
         final double mean = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> SmallMeanPoissonSampler.of(rng, mean));
@@ -74,8 +73,8 @@ class SmallMeanPoissonSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double mean = 1.23;
         final SharedStateDiscreteSampler sampler1 =
             SmallMeanPoissonSampler.of(rng1, mean);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
index df4f584f..03b88966 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
@@ -16,18 +16,18 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
 import java.util.function.Supplier;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.sampling.distribution.StableSampler.SpecialMath;
 import org.apache.commons.rng.sampling.distribution.StableSampler.Beta0CMSStableSampler;
 import org.apache.commons.rng.sampling.distribution.StableSampler.Beta0WeronStableSampler;
 import org.apache.commons.rng.sampling.distribution.StableSampler.CMSStableSampler;
+import org.apache.commons.rng.sampling.distribution.StableSampler.SpecialMath;
 import org.apache.commons.rng.sampling.distribution.StableSampler.WeronStableSampler;
 import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests for the class {@link StableSampler}.
@@ -1870,7 +1870,7 @@ class StableSamplerTest {
         // This is required for nextDouble() since invoking super.nextDouble() when
         // the sequence has expired will call nextLong() and may use the intended
         // sequence of longs.
-        final UniformRandomProvider rng = RandomSource.JSF_64.create(0x6237846L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
 
         // A RNG with the provided output
         return new SplitMix64(0L) {
@@ -2033,8 +2033,8 @@ class StableSamplerTest {
      * @param beta Beta.
      */
     private static void testSharedStateSampler(double alpha, double beta) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         StableSampler sampler1 = StableSampler.of(rng1, alpha, beta);
         StableSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
@@ -2093,8 +2093,8 @@ class StableSamplerTest {
      * @param ulp Allowed ULP difference.
      */
     private static void testTransformedSampler(double alpha, double beta, int ulp) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double gamma = 3.4;
         final double delta = -17.3;
         final StableSampler sampler1 = StableSampler.of(rng1, alpha, beta, gamma, delta);
@@ -2240,7 +2240,7 @@ class StableSamplerTest {
      */
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         for (final double[] p : new double[][] {
             {1.3, 0.1},
             {2.0, 0.0},
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/TSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/TSamplerTest.java
index 2112ab20..5f5bb3fe 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/TSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/TSamplerTest.java
@@ -18,7 +18,6 @@ package org.apache.commons.rng.sampling.distribution;
 
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -34,7 +33,7 @@ class TSamplerTest {
     @ParameterizedTest
     @ValueSource(doubles = {0, -1, Double.NaN})
     void testConstructorThrowsWithBadDegreesOfFreedom(double degreesOfFreedom) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> TSampler.of(rng, degreesOfFreedom));
     }
@@ -45,8 +44,8 @@ class TSamplerTest {
     @ParameterizedTest
     @ValueSource(doubles = {4.56, 1e16})
     void testSharedStateSampler(double degreesOfFreedom) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final TSampler sampler1 = TSampler.of(rng1, degreesOfFreedom);
         final TSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
@@ -57,8 +56,8 @@ class TSamplerTest {
      */
     @Test
     void testExtremelyLargeDegreesOfFreedom() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double degreesOfFreedom = 1e16;
         final ContinuousSampler sampler1 = TSampler.of(rng1, degreesOfFreedom);
         final ContinuousSampler sampler2 = ZigguratSampler.NormalizedGaussian.of(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
index 2b46fa0d..4e024590 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
+import java.util.Locale;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.LongProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
@@ -25,7 +26,6 @@ import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
-import java.util.Locale;
 
 /**
  * Test for the {@link UniformLongSampler}. The tests hit edge cases for the sampler
@@ -47,7 +47,7 @@ class UniformLongSamplerTest {
     void testConstructorThrowsWithLowerAboveUpper() {
         final long upper = 55;
         final long lower = upper + 1;
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> UniformLongSampler.of(rng, lower, upper));
     }
@@ -71,8 +71,8 @@ class UniformLongSamplerTest {
     void testSamplesWithFullRange() {
         final long upper = Long.MAX_VALUE;
         final long lower = Long.MIN_VALUE;
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final UniformLongSampler sampler = UniformLongSampler.of(rng2, lower, upper);
         for (int i = 0; i < 10; i++) {
             Assertions.assertEquals(rng1.nextLong(), sampler.sample());
@@ -193,8 +193,8 @@ class UniformLongSamplerTest {
             // Upper is inclusive so subtract 1
             final long upper = (1L << i) - 1;
             final int shift = 64 - i;
-            final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-            final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+            final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+            final UniformRandomProvider rng2 = RandomAssert.seededRNG();
             sampler = UniformLongSampler.of(rng2, lower, upper);
             for (int j = 0; j < 10; j++) {
                 Assertions.assertEquals(rng1.nextLong() >>> shift, sampler.sample());
@@ -211,8 +211,8 @@ class UniformLongSamplerTest {
         // Create a range bigger than 2^63
         final long upper = Long.MAX_VALUE / 2 + 1;
         final long lower = Long.MIN_VALUE / 2 - 1;
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final UniformLongSampler sampler = UniformLongSampler.of(rng2, lower, upper);
         for (int i = 0; i < 10; i++) {
             // Get the expected value by the rejection method
@@ -329,8 +329,8 @@ class UniformLongSamplerTest {
      * @param upper Upper.
      */
     private static void assertSharedStateSampler(long lower, long upper) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final UniformLongSampler sampler1 = UniformLongSampler.of(rng1, lower, upper);
         final UniformLongSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
@@ -365,7 +365,7 @@ class UniformLongSamplerTest {
      * @param upper Upper.
      */
     private static void assertToString(long lower, long upper) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final UniformLongSampler sampler = UniformLongSampler.of(rng, lower, upper);
         Assertions.assertTrue(sampler.toString().toLowerCase(Locale.US).contains("uniform"));
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
index 430681cf..f4e8b02c 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
@@ -16,11 +16,10 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.Assertions;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link ZigguratNormalizedGaussianSampler}.
@@ -45,8 +44,8 @@ class ZigguratNormalizedGaussianSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final SharedStateContinuousSampler sampler1 =
             ZigguratNormalizedGaussianSampler.<ZigguratNormalizedGaussianSampler>of(rng1);
         final SharedStateContinuousSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratSamplerTest.java
index 80447a5f..8d23932d 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratSamplerTest.java
@@ -16,11 +16,6 @@
  */
 package org.apache.commons.rng.sampling.distribution;
 
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
 import java.util.Arrays;
 import java.util.function.Function;
 import java.util.function.Supplier;
@@ -34,6 +29,11 @@ import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
 
 /**
  * Test for {@link ZigguratSampler}.
@@ -53,7 +53,7 @@ class ZigguratSamplerTest {
      */
     @Test
     void testExponentialConstructorThrowsWithZeroMean() {
-        final RestorableUniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double mean = 0;
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> ZigguratSampler.Exponential.of(rng, mean));
@@ -64,8 +64,8 @@ class ZigguratSamplerTest {
      */
     @Test
     void testExponentialSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final ZigguratSampler.Exponential sampler1 = ZigguratSampler.Exponential.of(rng1);
         final ZigguratSampler.Exponential sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
@@ -76,8 +76,8 @@ class ZigguratSamplerTest {
      */
     @Test
     void testExponentialSharedStateSamplerWithMean() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double mean = 1.23;
         final ZigguratSampler.Exponential sampler1 = ZigguratSampler.Exponential.of(rng1, mean);
         final ZigguratSampler.Exponential sampler2 = sampler1.withUniformRandomProvider(rng2);
@@ -89,8 +89,8 @@ class ZigguratSamplerTest {
      */
     @Test
     void testGaussianSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final ZigguratSampler.NormalizedGaussian sampler1 = ZigguratSampler.NormalizedGaussian.of(rng1);
         final ZigguratSampler.NormalizedGaussian sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/BoxSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/BoxSamplerTest.java
index 319be8dc..96a59a37 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/BoxSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/BoxSamplerTest.java
@@ -17,16 +17,12 @@
 package org.apache.commons.rng.sampling.shape;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.sampling.UnitSphereSampler;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link BoxSampler}.
@@ -37,7 +33,7 @@ class BoxSamplerTest {
      */
     @Test
     void testInvalidDimensionThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> BoxSampler.of(rng, new double[1], new double[1]));
     }
@@ -47,7 +43,7 @@ class BoxSamplerTest {
      */
     @Test
     void testDimensionMismatchThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double[] c2 = new double[2];
         final double[] c3 = new double[3];
         for (double[][] c : new double[][][] {
@@ -66,7 +62,7 @@ class BoxSamplerTest {
      */
     @Test
     void testNonFiniteVertexCoordinates() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // A valid box
         final double[][] c = new double[][] {
             {0, 1, 2}, {-1, 2, 3}
@@ -123,8 +119,6 @@ class BoxSamplerTest {
      * @param dimension the dimension
      */
     private static void testExtremeValueCoordinates(int dimension) {
-        // Object seed so use Long not long
-        final Long seed = 456456L;
         final double[][] c1 = new double[2][dimension];
         final double[][] c2 = new double[2][dimension];
         // Create a valid box that can be scaled
@@ -143,9 +137,9 @@ class BoxSamplerTest {
             "Expect vector b - a to be infinite in the x dimension");
 
         final BoxSampler sampler1 = BoxSampler.of(
-            RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c1[0], c1[1]);
+            RandomAssert.seededRNG(), c1[0], c1[1]);
         final BoxSampler sampler2 = BoxSampler.of(
-            RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c2[0], c2[1]);
+            RandomAssert.seededRNG(), c2[0], c2[1]);
 
         for (int n = 0; n < 10; n++) {
             final double[] a = sampler1.sample();
@@ -188,7 +182,7 @@ class BoxSamplerTest {
      * @param dimension the dimension
      */
     private static void testDistributionND(int dimension) {
-        final UniformRandomProvider rng = RandomSource.JSF_64.create(0xdabfab);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
 
         final UnitSphereSampler sphere = UnitSphereSampler.of(rng, dimension);
         final double[] a = sphere.sample();
@@ -270,8 +264,8 @@ class BoxSamplerTest {
      * Test the SharedStateSampler implementation for the given dimension.
      */
     private static void testSharedStateSampler(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final BoxSampler sampler1 = BoxSampler.of(rng1, c1, c2);
@@ -310,8 +304,8 @@ class BoxSamplerTest {
      * @param dimension the dimension
      */
     private static void testChangedInputCoordinates(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final BoxSampler sampler1 = BoxSampler.of(rng1, c1, c2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/LineSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/LineSamplerTest.java
index 4afd4724..4713681f 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/LineSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/LineSamplerTest.java
@@ -17,16 +17,12 @@
 package org.apache.commons.rng.sampling.shape;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.sampling.UnitSphereSampler;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link LineSampler}.
@@ -37,7 +33,7 @@ class LineSamplerTest {
      */
     @Test
     void testInvalidDimensionThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> LineSampler.of(rng, new double[0], new double[0]));
     }
@@ -47,7 +43,7 @@ class LineSamplerTest {
      */
     @Test
     void testDimensionMismatchThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double[] c2 = new double[2];
         final double[] c3 = new double[3];
         for (double[][] c : new double[][][] {
@@ -66,7 +62,7 @@ class LineSamplerTest {
      */
     @Test
     void testNonFiniteVertexCoordinates() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // A valid line
         final double[][] c = new double[][] {
             {0, 1, 2}, {-1, 2, 3}
@@ -133,8 +129,6 @@ class LineSamplerTest {
      * @param dimension the dimension
      */
     private static void testExtremeValueCoordinates(int dimension) {
-        // Object seed so use Long not long
-        final Long seed = 123454321L;
         final double[][] c1 = new double[2][dimension];
         final double[][] c2 = new double[2][dimension];
         // Create a valid line that can be scaled
@@ -153,9 +147,9 @@ class LineSamplerTest {
             "Expect vector b - a to be infinite in the x dimension");
 
         final LineSampler sampler1 = LineSampler.of(
-            RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c1[0], c1[1]);
+            RandomAssert.seededRNG(), c1[0], c1[1]);
         final LineSampler sampler2 = LineSampler.of(
-            RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c2[0], c2[1]);
+            RandomAssert.seededRNG(), c2[0], c2[1]);
 
         for (int n = 0; n < 10; n++) {
             final double[] a = sampler1.sample();
@@ -206,7 +200,7 @@ class LineSamplerTest {
      * @param dimension the dimension
      */
     private static void testDistributionND(int dimension) {
-        final UniformRandomProvider rng = RandomSource.SFC_64.create(0xfabcab);
+        final UniformRandomProvider rng = RandomAssert.createRNG();
 
         double[] a;
         double[] b;
@@ -297,8 +291,8 @@ class LineSamplerTest {
      * Test the SharedStateSampler implementation for the given dimension.
      */
     private static void testSharedStateSampler(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final LineSampler sampler1 = LineSampler.of(rng1, c1, c2);
@@ -345,8 +339,8 @@ class LineSamplerTest {
      * @param dimension the dimension
      */
     private static void testChangedInputCoordinates(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final LineSampler sampler1 = LineSampler.of(rng1, c1, c2);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TetrahedronSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TetrahedronSamplerTest.java
index 525e187e..419b96db 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TetrahedronSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TetrahedronSamplerTest.java
@@ -17,15 +17,11 @@
 package org.apache.commons.rng.sampling.shape;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link TetrahedronSampler}.
@@ -36,7 +32,7 @@ class TetrahedronSamplerTest {
      */
     @Test
     void testInvalidDimensionThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double[] ok = new double[3];
         final double[] bad = new double[2];
         final double[][] c = {ok, ok, ok, ok};
@@ -55,7 +51,7 @@ class TetrahedronSamplerTest {
      */
     @Test
     void testNonFiniteVertexCoordinates() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // A valid tetrahedron
         final double[][] c = new double[][] {
             {1, 1, 1}, {1, -1, 1}, {-1, 1, 1}, {1, 1, -1}
@@ -84,8 +80,6 @@ class TetrahedronSamplerTest {
      */
     @Test
     void testExtremeValueCoordinates() {
-        // Object seed so use Long not long
-        final Long seed = 876543L;
         // Create a valid tetrahedron that can be scaled
         final double[][] c1 = new double[][] {
             {1, 1, 1}, {1, -1, -1}, {-1, -1, 1}, {-1, 1, -1}
@@ -108,9 +102,9 @@ class TetrahedronSamplerTest {
             "Expect vector c - b to be infinite in the z dimension");
 
         final TetrahedronSampler sampler1 = TetrahedronSampler.of(
-                RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c1[0], c1[1], c1[2], c1[3]);
+            RandomAssert.seededRNG(), c1[0], c1[1], c1[2], c1[3]);
         final TetrahedronSampler sampler2 = TetrahedronSampler.of(
-                RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c2[0], c2[1], c2[2], c2[3]);
+            RandomAssert.seededRNG(), c2[0], c2[1], c2[2], c2[3]);
 
         for (int n = 0; n < 10; n++) {
             final double[] a = sampler1.sample();
@@ -163,8 +157,8 @@ class TetrahedronSamplerTest {
         final double[] expected = new double[binsXy * bins];
         Arrays.fill(expected, 1);
 
-        // Increase the loops and use a null seed (i.e. randomly generated) to verify robustness
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_512_PP.create(0xaabbccddeeffL);
+        // Increase the loops to verify robustness
+        final UniformRandomProvider rng = RandomAssert.createRNG();
 
         // Cut the box into 6 equal volume tetrahedra by cutting the box in half three times,
         // cutting diagonally through each of the three pairs of opposing faces. In this way,
@@ -248,8 +242,8 @@ class TetrahedronSamplerTest {
      */
     @Test
     void testSharedStateSampler() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(-1);
         final double[] c2 = createCoordinate(2);
         final double[] c3 = createCoordinate(-3);
@@ -264,8 +258,8 @@ class TetrahedronSamplerTest {
      */
     @Test
     void testChangedInputCoordinates() {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1);
         final double[] c2 = createCoordinate(2);
         final double[] c3 = createCoordinate(-3);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
index d60b5092..718afdf4 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
@@ -17,15 +17,11 @@
 package org.apache.commons.rng.sampling.shape;
 
 import java.util.Arrays;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link TriangleSampler}.
@@ -95,7 +91,7 @@ class TriangleSamplerTest {
      */
     @Test
     void testInvalidDimensionThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> TriangleSampler.of(rng, new double[1], new double[1], new double[1]));
     }
@@ -105,7 +101,7 @@ class TriangleSamplerTest {
      */
     @Test
     void testDimensionMismatchThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         final double[] c2 = new double[2];
         final double[] c3 = new double[3];
         for (double[][] c : new double[][][] {
@@ -128,7 +124,7 @@ class TriangleSamplerTest {
      */
     @Test
     void testNonFiniteVertexCoordinates() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         // A valid triangle
         final double[][] c = new double[][] {
             {0, 0, 1}, {2, 1, 0}, {-1, 2, 3}
@@ -185,8 +181,6 @@ class TriangleSamplerTest {
      * @param dimension the dimension
      */
     private static void testExtremeValueCoordinates(int dimension) {
-        // Object seed so use Long not long
-        final Long seed = 999666333L;
         final double[][] c1 = new double[3][dimension];
         final double[][] c2 = new double[3][dimension];
         // Create a valid triangle that can be scaled
@@ -215,9 +209,9 @@ class TriangleSamplerTest {
             "Expect vector c - b to be infinite in the y dimension");
 
         final TriangleSampler sampler1 = TriangleSampler.of(
-                RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c1[0], c1[1], c1[2]);
+            RandomAssert.seededRNG(), c1[0], c1[1], c1[2]);
         final TriangleSampler sampler2 = TriangleSampler.of(
-                RandomSource.XO_RO_SHI_RO_128_PP.create(seed), c2[0], c2[1], c2[2]);
+            RandomAssert.seededRNG(), c2[0], c2[1], c2[2]);
 
         for (int n = 0; n < 10; n++) {
             final double[] a = sampler1.sample();
@@ -311,8 +305,8 @@ class TriangleSamplerTest {
             throw new AssertionError("Unsupported dimension: " + dimension);
         }
 
-        // Increase the loops and use a null seed (i.e. randomly generated) to verify robustness
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_512_PP.create(0xfabcab);
+        // Increase the loops to verify robustness
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final TriangleSampler sampler1 = TriangleSampler.of(rng, forward.apply(a), forward.apply(d), forward.apply(b));
         final TriangleSampler sampler2 = TriangleSampler.of(rng, forward.apply(b), forward.apply(c), forward.apply(e));
         final TriangleSampler sampler3 = TriangleSampler.of(rng, forward.apply(c), forward.apply(d), forward.apply(e));
@@ -390,8 +384,8 @@ class TriangleSamplerTest {
      * Test the SharedStateSampler implementation for the given dimension.
      */
     private static void testSharedStateSampler(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final double[] c3 = createCoordinate(-3, dimension);
@@ -431,8 +425,8 @@ class TriangleSamplerTest {
      * @param dimension the dimension
      */
     private static void testChangedInputCoordinates(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final double[] c1 = createCoordinate(1, dimension);
         final double[] c2 = createCoordinate(2, dimension);
         final double[] c3 = createCoordinate(-3, dimension);
@@ -511,7 +505,7 @@ class TriangleSamplerTest {
             throw new AssertionError("Unsupported dimension: " + dimension);
         }
 
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(789L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         double sum = 0;
         for (int n = 0; n < 10; n++) {
             final double[] a = new double[] {rng.nextDouble(), rng.nextDouble()};
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/UnitBallSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/UnitBallSamplerTest.java
index 08748a5d..4d4a51dd 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/UnitBallSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/UnitBallSamplerTest.java
@@ -18,15 +18,12 @@ package org.apache.commons.rng.sampling.shape;
 
 import java.util.Arrays;
 import java.util.function.DoubleUnaryOperator;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
-
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.core.source64.SplitMix64;
 import org.apache.commons.rng.sampling.RandomAssert;
-import org.apache.commons.rng.simple.RandomSource;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for {@link UnitBallSampler}.
@@ -37,7 +34,7 @@ class UnitBallSamplerTest {
      */
     @Test
     void testInvalidDimensionThrows() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng = RandomAssert.seededRNG();
         Assertions.assertThrows(IllegalArgumentException.class,
             () -> UnitBallSampler.of(rng, 0));
     }
@@ -126,8 +123,8 @@ class UnitBallSamplerTest {
         final int samples = samplesPerBin * expected.length;
         Arrays.fill(expected, (double) samples / layers);
 
-        // Increase the loops and use a null seed (i.e. randomly generated) to verify robustness
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_512_PP.create(0xa1b2c3d4L);
+        // Increase the loops to verify robustness
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UnitBallSampler sampler = UnitBallSampler.of(rng, dimension);
         for (int loop = 0; loop < 1; loop++) {
             // Assign each coordinate to a layer inside the ball and an orthant using the sign
@@ -226,8 +223,8 @@ class UnitBallSamplerTest {
      * Test the SharedStateSampler implementation for the given dimension.
      */
     private static void testSharedStateSampler(int dimension) {
-        final UniformRandomProvider rng1 = RandomSource.SPLIT_MIX_64.create(0L);
-        final UniformRandomProvider rng2 = RandomSource.SPLIT_MIX_64.create(0L);
+        final UniformRandomProvider rng1 = RandomAssert.seededRNG();
+        final UniformRandomProvider rng2 = RandomAssert.seededRNG();
         final UnitBallSampler sampler1 = UnitBallSampler.of(rng1, dimension);
         final UnitBallSampler sampler2 = sampler1.withUniformRandomProvider(rng2);
         RandomAssert.assertProduceSameSequence(sampler1, sampler2);


[commons-rng] 04/04: Update LXM generator reference data

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit c362706c2b78b0d052099fdd2bdcc5ba2a3ead9a
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Sep 27 15:42:33 2022 +0100

    Update LXM generator reference data
    
    Previous data required certain bytes to have a zero-bit in the most
    significant bit due to an implementation bug in the JDK reference. The
    new seed data can be entirely random.
---
 .../rng/core/source64/L128X1024MixTest.java        | 100 ++++++++++-----------
 .../commons/rng/core/source64/L128X128MixTest.java |  82 ++++++++---------
 .../commons/rng/core/source64/L64X1024MixTest.java | 100 ++++++++++-----------
 .../commons/rng/core/source64/L64X128MixTest.java  |  76 ++++++++--------
 .../rng/core/source64/L64X128StarStarTest.java     |  79 ++++++++--------
 .../commons/rng/core/source64/L64X256MixTest.java  |  82 ++++++++---------
 6 files changed, 259 insertions(+), 260 deletions(-)

diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X1024MixTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X1024MixTest.java
index 276bf54d..e7d3621f 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X1024MixTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X1024MixTest.java
@@ -68,77 +68,77 @@ class L128X1024MixTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
+         * Reference data from JDK 19:
          * java.util.random.RandomGeneratorFactory.of("L128X1024MixRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0x847907737f670a2cL, 0xcb60793f261c7702L, 0x4d0623076241212cL, 0x1a771f1c4849561dL,
-                    0xe9214a30656c6621L, 0xce317a274f194d16L, 0x0274414662435445L, 0x1475285b682c1901L,
-                    0x1c370d7a6759381aL, 0x752d7d727966663aL, 0x2e2d131f10190254L, 0x7f0f0f5032053132L,
-                    0x1f617a47474b144dL, 0x0539411a037e693dL, 0x373801350060224cL, 0x01393b2c1b122104L,
-                    0x7808676475605545L, 0xec3764576637392dL, 0x9c22290673241d03L, 0xcb4031176e673e07L,
+                    0x6b58aa6ffc337cacL, 0x7554ffc31477c792L, 0xadb09543e412c559L, 0xaec37b44eedbebebL,
+                    0x1b5f8ce14fd365aaL, 0xdd9583b20d633d9aL, 0x047b8ee58629d33dL, 0x1455a9f0a1b5072cL,
+                    0x22176a92ad7fc152L, 0xdd5787b7217de80fL, 0xf2a39d303e489c65L, 0xc639427ce47fdf8fL,
+                    0x719635b081f3f914L, 0xa697379a497e7e39L, 0x9e7ae3aa56a287ccL, 0x8b4abd91a352faa5L,
+                    0x7b5f405155546a12L, 0x5b4043b9f1140d8fL, 0x2cb19f45483f80fbL, 0x0b6e5226e1c85467L,
                 },
                 new long[] {
-                    0x16a64b86bb4f77e8L, 0x08652ab51a725fe6L, 0x352b20ab3eb0e6e8L, 0xd3dfb9080cd0fff3L,
-                    0x679bb8834b8c39edL, 0x1db09e09b224efdbL, 0x15ad68e0b42df0ccL, 0xf0b3d174dee2f4d3L,
-                    0x10c2523ca4a4c906L, 0x07fb1f38ebb06949L, 0xe17296e0a4551815L, 0x4e767b11277bd5b7L,
-                    0xd2861b50ab58769eL, 0x9fda6327293b6edbL, 0xa700b1b39c091649L, 0x3fdb8ab4d3181817L,
-                    0xe8e650db502c46f1L, 0xfc6983d3b5499938L, 0x15ffd7b60dbbc81eL, 0xf21885310202f639L,
-                    0x416731e4a25fe54eL, 0xc96a09a45aafdbabL, 0xceebcd6c3eb7f410L, 0x6965dd7f2e5be202L,
-                    0xb135778200cebda5L, 0x323946de66ea8efcL, 0xd99f8550d934b1a7L, 0x7d54c10751e1943fL,
-                    0xfa58243c8f26168aL, 0x4f9503a63b956ac1L, 0xd717de76262d1689L, 0x2dae4df5fd85d281L,
-                    0xab587b41f01c52abL, 0x3a0ec6c60fbf40f2L, 0x85b92bcf3709aa15L, 0x81c19f123efa68fbL,
-                    0xac06a72f4dbc17edL, 0xd98df600b51e4f48L, 0x009871f979161bf1L, 0xb63b478960527bd5L,
+                    0x5fa2cf23d60cf67cL, 0xc31c2b6451aa2fbaL, 0xd2af323c077ee4d4L, 0x213bed298b3ad585L,
+                    0xdcce8c3e6f63d6c6L, 0x3dfc05a23b884532L, 0xbcbfe3860bef2eaaL, 0xf656a285e4ebbce1L,
+                    0x8f9505806a414372L, 0xbcff459696a30316L, 0xa700a8d63166a0aeL, 0x6407b055a4f0b3c7L,
+                    0xe77333b14d15309aL, 0x70a9155fd1c1961bL, 0xdfc035a8c748ae7eL, 0x534f5830fe5297caL,
+                    0xca187d9d2eab2437L, 0xcc3a1e20a36fa6abL, 0xf8f4960737866c0cL, 0x7eab49fd524b840dL,
+                    0x9937413f08979628L, 0x017565584f1da654L, 0x13c76265c74cc0a6L, 0x54de60aea30cedecL,
+                    0xe80ad8897a74b5a8L, 0xcd1555f1abbf30acL, 0x015d519e2a4c7d53L, 0xad32c13b44c39ffbL,
+                    0xcd6a12650b3753f8L, 0x1486ea548da30363L, 0x98987c807f9660d0L, 0x6bb14b89a9643040L,
+                    0x8ee4d97ec0bced99L, 0x3b9e0ee8a39a959aL, 0x5565cd513ab34ef9L, 0xd81ed95e235db404L,
+                    0x9167e57917401421L, 0x30808415959689a4L, 0x1b868f963e2be44cL, 0x70f98922267d2397L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x3d4306735a152d71L, 0xc1503e7e2f76750bL, 0x726865045a421d0aL, 0x905a1c0f777c280fL,
-                    0xab0b405e243f6655L, 0x7220783e26481705L, 0x3f1a2f071f22787dL, 0x2d624a5a5a1a487cL,
-                    0x643935551a0e1744L, 0x5a663f673a506b3aL, 0x76186d1e7a081e14L, 0xf64a453f6f2d5d4dL,
-                    0xec27754b5a230725L, 0x852e03364b2d2535L, 0xb71f004f51605102L, 0x0a0c7d68300d575bL,
-                    0x9943777910780256L, 0x383b43005c1c4a77L, 0x9923163f2e246e2eL, 0x2e7a657e1079281bL,
+                    0x72831df890850049L, 0x14d5fad4e42f9302L, 0xde0b08b519b5ed35L, 0xb074db75c9a488eeL,
+                    0x9b32cb087f31bb65L, 0xc47709977d2f66bdL, 0x801689b1d45ccec6L, 0x17b9a964bd7c2914L,
+                    0xf4691614d2280435L, 0x8e891da749b9afc6L, 0xe452871043428ec9L, 0x3412688e450d367cL,
+                    0xb47eaadd6c656be4L, 0x4e4c09a9d9055ec9L, 0x60e549d120c759caL, 0xb1e0ebc749dc7df4L,
+                    0xf479ceebad6b798aL, 0xb71d9e212eb1d1c1L, 0x28f0025d7748addaL, 0x6063774bbe188331L,
                 },
                 new long[] {
-                    0x43843e06d6aa8933L, 0x760b374cdcc21a2eL, 0xf02694e16403b8d2L, 0x3c14fd3a09551e59L,
-                    0xcd9acc1bf34253d8L, 0xa2677f96de7f389fL, 0xedaec653655a85f2L, 0x30e1bc7dd9e931fdL,
-                    0x9ee8ae96e94e61beL, 0x6949cf0a241bbd7bL, 0x72ed6630513dfed0L, 0x9bd0ebfc89db4d8dL,
-                    0xdd6f0a8f70451e3dL, 0x59e9fb17058f1fe2L, 0xd29197fffc0ce21dL, 0x424d6b309b44d7deL,
-                    0x8ce459db11a1abbfL, 0xf7f56ebd0a9f8578L, 0xe54de673fd1a7d54L, 0x11bd4054dd8f2ea0L,
-                    0xb15c3202a4eecb51L, 0xc93e7c2a0c44487bL, 0xf505494bc0e60deaL, 0xdb73777f97262200L,
-                    0xada728f47bff2975L, 0x501d543141ac9285L, 0xe14f70683e9442a1L, 0x6d44ceeccf039483L,
-                    0x4bf0401aeca9de03L, 0xba0bd837fb8850a7L, 0xf3ef477cee53d8a1L, 0x84866359a6dcdbceL,
-                    0xf38284481dfa4ab6L, 0x9b1c6c1bf3ceee63L, 0x4254e6ac337f55fbL, 0x3f5b499c46a13ddfL,
-                    0xf6d4ea2708c600caL, 0x4c7a9c3c986f4a7aL, 0x4a7aa1e3fe17b370L, 0x03e457ba810546f8L,
+                    0x237759030495d6bdL, 0xa1085516169c5723L, 0xf2938d898f81a4dcL, 0x3f2472fa6229549fL,
+                    0x7b5c7d86db5cd897L, 0x2a3e9a1a243ab91fL, 0xad94f5d540a46bccL, 0x7cf02d130867296eL,
+                    0x9ad5f8a5e883b2b2L, 0xc37ac97fff9ba5bdL, 0xf1d836c448e74e62L, 0xdface229fa5babe0L,
+                    0x83fac2cce3a51eeeL, 0xfde459054fb9a650L, 0xf2289c9c7a3ce827L, 0x6096deea7085c16fL,
+                    0xa7542a7e16638f15L, 0x0f38a3642d12078aL, 0x46f08e525547a329L, 0x6ffec9295514502cL,
+                    0xef0ae056313ac76aL, 0x0972748d1e10ce75L, 0x45d76330939da7abL, 0x49a51c499b44c48fL,
+                    0xcda6ac64fcb7e891L, 0xe08859838fb0fec5L, 0xbd1e49427e9460d3L, 0x69ab2b69ce6a6aacL,
+                    0xc4cf49487adaf18fL, 0xf18641ff23c6d099L, 0xe25d8d4195a84f10L, 0x85602ba0e16337cfL,
+                    0x118f4640b8f3550bL, 0xae642cb3a6d01717L, 0x5d3f27a3d6534f66L, 0xbf4ed49c67cd4a4cL,
+                    0x1400824879988551L, 0xad2a6637c4512f53L, 0xf424063005575699L, 0xb29f63cbd1acb668L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x5a3436133e6d4878L, 0xbd471a486c233413L, 0x3a1e141f643a1a15L, 0x35584a2c3a514d6dL,
-                    0x15462b005234675cL, 0x100c3674063b4d2bL, 0xc67f0c760c2a4149L, 0x36530758667a4017L,
-                    0x0f527d1a20512f38L, 0x224d0430615c4009L, 0x857d5f576c20290eL, 0x247d23184508793fL,
-                    0xed530606415c5d7aL, 0x194e7a0103414b12L, 0x2e03337c393e080bL, 0x736a171f506e5350L,
-                    0x0c59070650497402L, 0x287b01437241213fL, 0xf60e374d567a3f6cL, 0xa9635e395b2f5f03L,
+                    0x1362c961e1630fbeL, 0xa15f80cdcb56460fL, 0x54a55905815c1d21L, 0x3ae5f0c7bb27dddcL,
+                    0x829c93e6c7c7025bL, 0xb0213f4c376814c1L, 0xba8cbf51f44bb2a5L, 0xeb34355868993b1fL,
+                    0x08f3cda12137f730L, 0x4059c90010dc3b11L, 0xf7268debee731db0L, 0xba1e6900e52effb0L,
+                    0x9901ff51f11fa35bL, 0x28d5e83d8aee75ceL, 0xf38c8641eb866c6dL, 0x9cfa85edc14efaa0L,
+                    0x9e55a1737705d52bL, 0x15a494ad0cf92e68L, 0x74b70ce02553f7ddL, 0x1270569fe023553eL,
                 },
                 new long[] {
-                    0x6e4abb493293e3cfL, 0x57534af73dcd1d1eL, 0x0c66796854cb1e56L, 0xe3c3b560cf82b3baL,
-                    0xab53f3c3ca41c10dL, 0x278f0028e279a327L, 0xcca0f86cdb902d14L, 0x442046c504f378a2L,
-                    0xf799e6907cfff304L, 0xd5d703efa5e39620L, 0xd54f7043ee6c03d5L, 0xc7713f5af1ead63dL,
-                    0x857d603adc723d19L, 0x42a1147bc4844e0fL, 0x204993b253531d7cL, 0x67cc7cae796e3297L,
-                    0x7e17cc851367c8b3L, 0xae6d089adc64d157L, 0x54bf513c06041c2fL, 0x5975f68e8b1c3cbbL,
-                    0x30551255b5e791dcL, 0xb5500a471d2bf585L, 0x5eafdd741ed469beL, 0x34ddf80f26fbd921L,
-                    0x45704fee22f2c0a0L, 0x4735f0ec33fdf033L, 0x6864735d1bbe507eL, 0x47627355d302620cL,
-                    0xe99b2b58c414399cL, 0x7d8a28cba60e5938L, 0xc29fd6a62a43fdf6L, 0x4715e2b8c3637eedL,
-                    0xfdd17d771ccc525dL, 0xeb99d1815b304ef1L, 0x9679eb1d3b133e68L, 0xcabcd9a42c445c99L,
-                    0x479d66e6c85c98beL, 0xba9516550452d729L, 0x299e54b50cebe420L, 0x8fde3ca654cd399dL,
+                    0x6959d677d00dd35dL, 0x06faab2179b4dbe7L, 0x40ffae141e27250dL, 0x77fdf94f98ee84bfL,
+                    0x981562b903976493L, 0x54036193c77a82fbL, 0x2cf0959da786b980L, 0x7b2481c1a56508dcL,
+                    0x319b4e1e4fc56d20L, 0xc54d3ad54cfd1499L, 0xbb32cf5518dd6be9L, 0xaa4e32f37f7a2586L,
+                    0xf67aacc627b86195L, 0x88980c4616943de3L, 0xb837ab119857807dL, 0x0cfbc2544dbf48b8L,
+                    0xe8b9884fa0ae4e34L, 0x489aaa0d0627a22cL, 0x5443cebef68ea0a6L, 0x5ca4968dfd31b40aL,
+                    0x74cfc71092585a27L, 0x0bda495018792daeL, 0x654affcb7eedad76L, 0xfcb97ca8b72c4382L,
+                    0x89b6d82c5e526ef0L, 0x1d7c02820d6de8d5L, 0x69fe9b84565391a2L, 0xecca48b5a815e5c5L,
+                    0x8f1503297cd02494L, 0x440ee5546a18b02cL, 0xf45519c36b910074L, 0x43dc905fa1732ccbL,
+                    0x27440d7f50533e2eL, 0xab553d44b699875bL, 0x6162c477b201aabbL, 0x5a1addc6a8151187L,
+                    0x33e56bf53aacefb4L, 0x108e02cfdb44c699L, 0xc985a4c385edf80dL, 0x4384e8799019d966L,
                 }));
     }
 
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X128MixTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X128MixTest.java
index 24bad789..406741b7 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X128MixTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L128X128MixTest.java
@@ -69,68 +69,68 @@ class L128X128MixTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
+         * Reference data from JDK 19:
          * java.util.random.RandomGeneratorFactory.of("L128X128MixRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0x3a297b7429761628L, 0x9d21645f201b7021L, 0xba324e3c4d146537L, 0x16364205433a7113L,
-                    0xf60962173e0c5742L, 0x3e7f5f502633755fL,
+                    0xf7a78c13fc329c64L, 0xef8c948e0494a150L, 0xac4b477c6908b1bdL, 0x3b98735f99c554c8L,
+                    0x702659bd934b4909L, 0xfd71d0bb15bc255dL,
                 },
                 new long[] {
-                    0x1ea7a5960faef34dL, 0xe77f9f6290dc93f2L, 0x74aefd78ce4030fdL, 0xc081b6e4c3595c02L,
-                    0x3b1edc17aa95bcb4L, 0xc14bf25e77010cb2L, 0xe7395dfccaa9dbcaL, 0xbebad53c986c6f58L,
-                    0x8f8a7583d30ec2e4L, 0xe2c541e3be5ea9b0L, 0x3bd9827396ed52fcL, 0xf21e25d719195bd6L,
-                    0x133fdd3ec02e5349L, 0xe4173fa34456f84cL, 0xf749b087f88e3cefL, 0xd078170802484e3cL,
-                    0x05f06c0da0b2fa8bL, 0x42b7c01bcf46c009L, 0xeae2728936c06176L, 0x71b6f995578a341dL,
-                    0x1dc20c1eb7dde50bL, 0x4dfe3a2dc06884f9L, 0x53f8a64ef6620772L, 0x09f05fe07be6c5aaL,
-                    0x019dd2cec64bd224L, 0xc91122977e5795a1L, 0x5ca628e227a9c59cL, 0x1c45e0b0ba328638L,
-                    0x431beb396ed3d853L, 0x270db91f7a43193cL, 0xba22d45ffa952da8L, 0xa03026f48d0a16eaL,
-                    0xd59e56fa28a9fd0bL, 0x5d3e3178bf2d1bddL, 0xd4a01fc739524149L, 0x08d25b8c425dcbedL,
-                    0x6b53b7544bd12866L, 0x4c1ba8e9baacd1d4L, 0x6a2c03ce0e64be9eL, 0xaef1188c7b49e967L,
+                    0xb8a3befcc9d12da1L, 0x0aa25f8df2b6d30fL, 0x377d33c3a36a02ebL, 0xd7c7fe74dbc32741L,
+                    0x758ee8a262f1a31fL, 0x22d8616b5ffba248L, 0xc63691898f00d2b3L, 0xe730156a52a30750L,
+                    0x2bc09f92096f83a5L, 0x788e002353be1ddcL, 0x77b06a59be8cce16L, 0xf999cd4ce13b3604L,
+                    0xec9a14c9327ff9e9L, 0x01b27bc5bad453c5L, 0x168617c059484a23L, 0xa14908b9013b0bf4L,
+                    0xf86d3652e36ae2fbL, 0x6a6dd1eb42453991L, 0xd1c2a605c8657763L, 0x5eb946fd92b2149eL,
+                    0xe2c7bd97792c9a54L, 0x7a1072a987220290L, 0x95509bfdfbe5dfd6L, 0xd773ef0b1a11ea4bL,
+                    0x23b820058b149fbcL, 0xfa0c47fb90be1869L, 0xe0deb44ae92cfa4fL, 0x74c3e743907845c3L,
+                    0x24d2b874702ce165L, 0x07aaeb42bfa6cdabL, 0xd2c4f8831c34953cL, 0x5864cac991d89733L,
+                    0x2d18205aadd00e16L, 0xba6358375a1c78c1L, 0x544e9dc9a710bbf6L, 0x6f43b974aeff36c9L,
+                    0x0bc71cf292068347L, 0x2ae0f87e3276731cL, 0x5c8b0866ded3fb5aL, 0x4ef10c7dcae51e25L,
                 }),
             Arguments.of(
                 new long[] {
-                    0xab05120b1d68141aL, 0xaa16702f314b0958L, 0x48712e101702612cL, 0x52564c1c0c462c6aL,
-                    0x02442c63271c2e65L, 0xa8256d670f6a0f50L,
+                    0x4545d46b1b673815L, 0x0806c96b523a302cL, 0x82f2829259399f1eL, 0x1aaed35434ddf7c3L,
+                    0xcf18a9ed54609638L, 0x7340b6851a41457eL,
                 },
                 new long[] {
-                    0xb26e759a441f5966L, 0xc754e012f0e5b695L, 0x6f63edc0e02b9339L, 0xe3b4a2f074e68065L,
-                    0x50e3133fee680fb1L, 0x4806d74486f1047aL, 0x636a4bb9b1588135L, 0xa38a1d12165a1a5eL,
-                    0x1c93a08893b5d460L, 0xe5f12c095908d68bL, 0xc8209614bdf5c3aaL, 0x269514b48092e05cL,
-                    0xf53376fb46c4068fL, 0x1c29c163c83808a1L, 0x4e061b72e2558d90L, 0x764dbe734460cd58L,
-                    0x951eed50f2688936L, 0x90c431c196e7caa2L, 0x546c18e2ae8449cbL, 0xfa53c4db8f104337L,
-                    0x6101109a7906c635L, 0xd60391b908c7689aL, 0x2edba3f7777b0fceL, 0xc58ec62f686cfafeL,
-                    0xb46e6b9a63f7a5c8L, 0x0882126f0efd1c8cL, 0xb0a74862abb8fdceL, 0xeb73ae25e8d0cb13L,
-                    0x6d2cabda24960b3fL, 0xa066055ef4918eb3L, 0x5e41aee4befadce1L, 0x8d0188693ebc3e89L,
-                    0x42b7171e98c7ba4bL, 0x6cf4919164a36dedL, 0xd90883fa3b33a4daL, 0x01ac3a18f4020a05L,
-                    0x1ec9164000c2c5c3L, 0xa90a377959d611baL, 0x4719833abe706dc0L, 0xf9a18b8597be90c8L,
+                    0x813e05de773584dbL, 0x75fbaf767fd4e4d7L, 0x1160b629ad35e420L, 0xf8850cae917f8dffL,
+                    0xe0457f00e2ace49dL, 0xec8d69e7e8ee29bfL, 0x51d9fbf6e213ca8aL, 0x899dba9a21163ce8L,
+                    0x2e7b28807b274195L, 0x6aa548f1b93007ceL, 0x1211481ba5634f60L, 0x8d84948c5d7721f9L,
+                    0x3934e7b0be28c84cL, 0x22a8842d6e92540cL, 0x4e5543d059af300bL, 0xa3be91fbe4a31b65L,
+                    0x8555bcb95a292ae8L, 0xd7c0761ca7f6e51fL, 0x9bc2e7f8bc4a5c35L, 0x6ecba9e5da68d11bL,
+                    0xb6dd609ff75da3e6L, 0xb419b5841e8242e3L, 0x10affb57349d69d6L, 0xa2468a067cd111c8L,
+                    0xca06bc18b07a23f6L, 0x6c35acec00214ff7L, 0x948af68673ceb096L, 0x3ffaef071fa7d66dL,
+                    0xd50d3eb49a99557aL, 0x59a5d62382db6922L, 0x5b2711614a95aa11L, 0x57721649868077bcL,
+                    0xc0ab75a00b5c9a54L, 0xd5a855baab2f9e73L, 0xcd0b779a4b00bbfcL, 0x20017121200dc1ddL,
+                    0x5054ac4a75515202L, 0x7eff78db2ba3327dL, 0x3d2ddad31a4c073bL, 0xd766756cde66e520L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x68034679056f6362L, 0xe666227323110c1cL, 0xaa502d6b5e676c61L, 0xe94d1d266d030b23L,
-                    0x50253d7d19161d66L, 0x5f64221100172276L,
+                    0xca3ad0c9fdb80553L, 0x9a1d5d6b9970d990L, 0x325734fae5d66ea8L, 0x20e5991e069f70dfL,
+                    0x97e5e144d0cae5beL, 0xf778cc0ff3bbe5d0L,
                 },
                 new long[] {
-                    0xcf85d748550aaf08L, 0xa1903ba42f5c24a0L, 0x64df004d9a06460aL, 0xfbf4062ca343346cL,
-                    0x5bdf77cdfdac6cf8L, 0x5e16cbd71a4020a3L, 0x3835ab4dde607646L, 0xa1ccb3ec0909470cL,
-                    0x3d6f31f8aedb785fL, 0x8214004c996c8bf6L, 0xc6c775f354564e3cL, 0x6054e091e54a7278L,
-                    0xd7a4b3827266b0fdL, 0x78ef85c8c29cc270L, 0x1e92d5e38336284bL, 0xd2d7939efd300d8aL,
-                    0xa3b4a28536af8e04L, 0x5f1510ef2c9611dbL, 0xacbffd845e921744L, 0xeb46cad5d2c25cd9L,
-                    0xd449bc48ce4c0288L, 0x738064dc34ed21a9L, 0xac85af76c0d4ae3eL, 0xf04885858cce92f8L,
-                    0x3288572bff8677d4L, 0xc58371958117ecd1L, 0x018a1d0d5f6d6bb7L, 0xe29afe1c6f54208fL,
-                    0x724c19235787dfb1L, 0x1d47fde2388156eaL, 0xb6316593e1cc5ac8L, 0x15f8c8c913938180L,
-                    0x0d38390376df87feL, 0x950b50b0b4af2525L, 0x1d2d86b7b52aeabbL, 0x8331694e910a3705L,
-                    0xc962bf20dc7ae05bL, 0x07b911ecb2b6e5f8L, 0x2e814094668c24eaL, 0xc259ec3c9a99750aL,
+                    0xf4662b85cbe7d457L, 0xe960eff7cce91220L, 0x501e265cfdd3d9ddL, 0x112ecbd65f94d068L,
+                    0xaef96e7cb7cef806L, 0xfc6d69cb2f17c7ffL, 0xabbe0e5a0a756ee6L, 0x574210c4bfd26204L,
+                    0xd56d82c7d5af5844L, 0x6cba6352115d13b3L, 0x3fb3cc3c4cb673d2L, 0x5b14ce737608823dL,
+                    0xc3d042947b4d9d09L, 0x15be86cd65bf7a76L, 0x72896127eb90f17bL, 0xeacd7326935ea13dL,
+                    0xfbc85eb3a5cfb667L, 0x298b9763221c4d8fL, 0x284d146047d37be0L, 0xf99aae51c8fe4377L,
+                    0xc4dbc790201f47ffL, 0x39e0363f4e66f8b0L, 0x21e0903dbe177124L, 0x4e3ce16e5a9b4a34L,
+                    0x502969d272b05192L, 0x55f395dd777066b5L, 0xcaf3bbac8c86090dL, 0x3450b10eff592cf7L,
+                    0x8edbbaa7fb43dd23L, 0x8cc4624b087758a2L, 0x4de23a236e734d75L, 0x96f82ab35df96018L,
+                    0x744fca3a57366d80L, 0x3c30b7f058c689d6L, 0x54d8c98deccd6bafL, 0xaa31a308717c5a79L,
+                    0x00a5cbf1228ff424L, 0x7faf65d94b81faf6L, 0x4d5624366334513eL, 0x1613c5c23ee26a7eL,
                 }));
     }
 
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X1024MixTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X1024MixTest.java
index cc53a161..736fb4cb 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X1024MixTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X1024MixTest.java
@@ -68,77 +68,77 @@ class L64X1024MixTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
+         * Reference data from JDK 19:
          * java.util.random.RandomGeneratorFactory.of("L64X1024MixRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0xca03226f3b01261dL, 0x9a4072143201313bL,
-                    0xd926667a2d47376fL, 0x4d6c207f3970190cL, 0x47674b1d727a1864L, 0xe9690738771f7564L,
-                    0x7b5772414c1d4911L, 0x4f1b6709796d554dL, 0x6830481709626056L, 0x0079145654746432L,
-                    0xd80557672c7b0f16L, 0x6c006c063728501aL, 0x224d1c2231223135L, 0xe54b38267c774412L,
-                    0x5e434374462a697cL, 0x5e523f08696d4154L, 0xec6e770542517a7aL, 0xc80f7b222063171fL,
+                    0x6d03aad14e58f8beL, 0xd4c213de342c1162L, 0xd597eafd698d6175L, 0xe97dcf3d06517a81L,
+                    0x8fea00579bc8811fL, 0x6309bcb2aea9a4deL, 0x7ac44e80035abac9L, 0xa675b5664574acfaL,
+                    0x6f0b919d4411bd4bL, 0xc4385eca083e11f4L, 0xae4da78f6ee015d7L, 0x5ed8e1cfcf602e2cL,
+                    0x9adebb2f8ee338e8L, 0x7c42477aca7bf3e5L, 0xd5c934704ecce9c8L, 0xa7fcd1cc6f3cc3d9L,
+                    0x4fcda8f3c0f0e9b9L, 0xf5a0bef115769b05L,
                 },
                 new long[] {
-                    0x9e4cec0bbde71682L, 0x0c5743461d7efdb6L, 0xf53dd523366d85a4L, 0x71e8c10d41c40334L,
-                    0x3f220a99cfeada3aL, 0xfaf2e47b4b07ed4eL, 0x14ed83a98896ba31L, 0x9edebf98b36b1b9fL,
-                    0x0a9ba0f7b3ab6175L, 0x978afd6e4072b35fL, 0x692ad061d1a892c2L, 0x33ca5f76cab2d07cL,
-                    0x92c276ba933acc76L, 0xccba20e15efb8c73L, 0xd18002eecfb7f704L, 0x73c69198abd748a5L,
-                    0xcf97c9abcba58ce5L, 0x190c808fd9122ec2L, 0x51723fbb1e14b8f7L, 0x42e6ce0bc68aecd8L,
-                    0x3ac053dbfd27dc96L, 0x095303a8d8c740b3L, 0xeb6838e053ce700bL, 0x35c5c9d6bda511e2L,
-                    0xdc00af14c0ea9505L, 0x260353d68b8b6bf2L, 0xb8303edce2102ac0L, 0xc579aa4cd2c3bfe3L,
-                    0x36ba5233d4209182L, 0x11dfc73f40dd439dL, 0x697816afda914386L, 0x70a24741fb461579L,
-                    0x461c7f4f4e3e13aeL, 0xe451b43cc3faec68L, 0xdc1d659897a21cffL, 0xebe38fd616677617L,
-                    0x62572f9da023db27L, 0x227a328aaa96b26fL, 0x26b55d72e7cb3f28L, 0x820f8a339d14eb0aL,
+                    0xdf77d6d9db757098L, 0x0769611d12b166c7L, 0x708c4e0c0b172d54L, 0x85a2116d903b3110L,
+                    0x3907a7d0cd664028L, 0xab1cf1a27126232aL, 0xf5a0ffc53b0e881cL, 0x0dc4aacd8d4ab80fL,
+                    0x6378f240f93e410eL, 0xf4b3f7453749afbbL, 0xda50ef44cffd1ac0L, 0xe4b8986625162c7bL,
+                    0x9cf06807071e3298L, 0x5601d712f9216a74L, 0xe5f63284ff4cdb0eL, 0xa4f750918672c1f1L,
+                    0x0c282fc046e88796L, 0x02a3c158d433bb9cL, 0x3a4a103208803a12L, 0x3c7c9892ecbe1435L,
+                    0x53fe51d586d0a9c9L, 0x0b9d8f499ac3b7adL, 0xa60744cd33c8237eL, 0xfcd11a8401f66410L,
+                    0x27a1a8ef0083950eL, 0x83a43fca0b04f357L, 0xea1a6ad13d53f526L, 0xd46548f3c38cbfa8L,
+                    0x66510fffc2efd464L, 0x0fa0ea2a25a26e12L, 0x95b947b27fc1e38dL, 0xae48ee91936b4a0cL,
+                    0x3b6a6fe3aa245f36L, 0x4d172e1c972b6029L, 0xf56228f6cfaa19f8L, 0x132c2d231740e656L,
+                    0x7b414119880f0602L, 0x7b04530dee6f280dL, 0x570efef48afa46c1L, 0x1526790b50b1c5f0L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x5b464417077b2524L, 0xdb741039765b1e3aL,
-                    0x39446556365d1b21L, 0xb33d473545745f3aL, 0x276f081368096368L, 0x3518237203624325L,
-                    0xcd5308535c656b50L, 0x4d49137b5c026935L, 0xba536d2941171771L, 0x3364082c1712430bL,
-                    0xbc3e613e47150259L, 0xa75441394924054cL, 0xed2b66352a560b1fL, 0xd022471f3504144aL,
-                    0x2b604f50263a156cL, 0x1f12170a76035534L, 0xce294a2c74753b19L, 0x5e3f685b0b245661L,
+                    0x4e5d2758950ce2f6L, 0x26eb64e6f6ce2f4cL, 0x67dbaeb866eb5146L, 0x2e53f5d363ccc0caL,
+                    0xb082d1f77b99b907L, 0x3d739ee76d3218a5L, 0x2e94a38e16245b39L, 0x13412e76abeca10cL,
+                    0x5e5454bc36fbec04L, 0x1bb9d711b459e3c6L, 0x21e532cad599a4b6L, 0xee674b9fa2375928L,
+                    0xd4142c6ed43d6ad9L, 0x90fb3eb966686cbdL, 0x668de128668949acL, 0xf90dd2df394ec382L,
+                    0x912c0e71f4ed3031L, 0xf0c5b9f6cce6f885L,
                 },
                 new long[] {
-                    0x00354c35c9ce8debL, 0x160325bf7614c724L, 0x31ab2503f939a58dL, 0x2b6d719d0d0b5ea3L,
-                    0xeaaa842ca62dc0b3L, 0x20eb6b2b74baedbeL, 0x9efeb411f9c6e328L, 0xa22ae76c0cfcf624L,
-                    0x4b66f8525cb6faecL, 0xc880b839d82ef494L, 0xfec62366978e29abL, 0x44a492a7b145becbL,
-                    0x1801a2bf4c9f47efL, 0x8489c117b90c73d3L, 0xa7dd633e622e3437L, 0x84941696c38d9d23L,
-                    0xa98faa3e6aaacdcfL, 0x19d59224a50095d0L, 0xe9c7239cd575c1c5L, 0xebdc11c43dbfef89L,
-                    0xe9873bce2133d419L, 0x1ee76f7efa7e7e64L, 0x7ad7abe737d78323L, 0xb636edf4f1690b89L,
-                    0xb03b4051ae7773a1L, 0x0115d01af9a3bdc6L, 0x8a0a958882934ec1L, 0x4d1f35f737ac69fdL,
-                    0xc232a55d6a13c97cL, 0x5238ad0760bfe5bcL, 0xeabdf873c076270bL, 0x517ac4dd13562203L,
-                    0x67f7c356484ba8b3L, 0x3bbef4723003e48bL, 0xf139f49d7f7a8dd8L, 0xdf75073a5f0387a8L,
-                    0x2288c8ad617b8076L, 0x36fe63b9fb97c59dL, 0xe1570ec1967a5186L, 0x6b945ae90b4d7f40L,
+                    0xe6f95d595a4af8f8L, 0x0c17ba67cad911c8L, 0x404d3881e064f874L, 0x8d327b13d44d02ddL,
+                    0xbb2d324c29f355ddL, 0x50330bbc22e58c05L, 0x273b48550711ac35L, 0x52c7c59b6e5eb50dL,
+                    0xc569a2c2b5b750b4L, 0x48faa3df570c128bL, 0xa23d12062036f287L, 0xd9503f17c8551f7cL,
+                    0x0981a8e88e96ed3cL, 0x02334ba7bd2c7a50L, 0xc2130c5adb86f369L, 0x752eb27167b77d0cL,
+                    0xbdf62fff413892b4L, 0x4fc6ce43dbb707baL, 0x2be070d3f3ac6a21L, 0x92ba5a0c83bf80f1L,
+                    0xfcfd5662258e8ff9L, 0xe24f65da07bbd2b5L, 0x76c40dd4fd3c0f46L, 0x6a89d17f8ce1591bL,
+                    0x8e4aab3bcf6e44d4L, 0x75af39a30c384e90L, 0x6cbe6c1c78cf01c9L, 0x5843c4c0cdd76fbeL,
+                    0x23e4b707d2e89314L, 0xbb5d3050cdc05ddbL, 0x7856e971b410dabcL, 0xc525d7da4da96e56L,
+                    0x6cac7c7d4baca7e5L, 0x03e6c6839e74d3aaL, 0x0ac2f86811ef3634L, 0xc958a175552a7795L,
+                    0xbe2887523e1c4024L, 0x57fc2e99d06003c9L, 0xd6ad5ef42ecbb49bL, 0xa3b621ec83b1871fL,
                 }),
             Arguments.of(
                 new long[] {
-                    0xb12c333a355c7c1eL, 0xbc755d3c47642146L,
-                    0xb85e5b5412716228L, 0xb041795a1e13265aL, 0x23310f54405f0721L, 0xc006072e53321602L,
-                    0xe00b775c5a122b02L, 0x465652350f4a6a07L, 0xad132729177f7718L, 0xd96122397040196fL,
-                    0x5a7602557020575fL, 0xd70904063e100a7fL, 0x51172f7872206f0dL, 0xa939510a4259666eL,
-                    0xbd300b4e75437a55L, 0x390b776402611b6bL, 0x653137325e691747L, 0x8067514f2a4d4d7bL,
+                    0x2adf28f2d3abfe32L, 0xc30b0861ed8bd4c4L, 0x282546a94af8b08fL, 0xbfba98ae6a0461c3L,
+                    0xba8d7237f5194544L, 0x030e02b1530cf49eL, 0x7da2ef20c7469ecdL, 0x449858a06567c5feL,
+                    0x5efd6bd4c4f2b24aL, 0x6ad10da447eb6b22L, 0x411402a4cf9eeeffL, 0x16d11360e0712af1L,
+                    0xb1fa3007f9f4588aL, 0x5054dcb198cd5032L, 0x73b7545983150dcdL, 0x8f61e32fb7b252ffL,
+                    0x51ca7eec0f4430efL, 0x24d1f99aabf6a75cL,
                 },
                 new long[] {
-                    0x54c1ce77f29f4f0eL, 0x01e8dccd6c287771L, 0xdca04ce508edb108L, 0x43eaaafc30d568c7L,
-                    0x6c127d5ac0c817a0L, 0x4a087f20c482a0b9L, 0x6e0f52f0f6661d53L, 0x2325216bedf5df1dL,
-                    0xaec61a8e97399dc8L, 0xb3915e80a05167c6L, 0x7da9dd81fc46eeb2L, 0x50ae26a8ec38edd0L,
-                    0x8a972cdcb0998498L, 0x3bf00b045c323ddaL, 0x9be071a64da0bf2dL, 0xf522fe5cafeb8a68L,
-                    0xacab485bf32ebfe6L, 0x16376a49fb6f0183L, 0xa3ae978f843cc96fL, 0xadf7ec319dae447eL,
-                    0x2fa3d25318594f29L, 0x9393b88f73fd1cb4L, 0x114c0987ff63717bL, 0xd682ac09b1c4ddc8L,
-                    0x483f5de1559da9a6L, 0xa94da376a7273489L, 0xd0c128feb97c394cL, 0x81291d7e85be4923L,
-                    0x250013089d41fc4eL, 0x3a20e0abfd4fc7f1L, 0x6f36b9287c1cc333L, 0x648fa8168da53117L,
-                    0xfc9ed78756025597L, 0x8f45c16fb8da57f5L, 0x2e03559e30bde857L, 0xd6e491f8c8c22546L,
-                    0xaa84a5cf5b0668caL, 0xecb643d0e758e7edL, 0xe6eba4065ff373abL, 0xb80a1412a869cef7L,
+                    0x6e7ff191c0830aacL, 0x4b3752f3792d8ec8L, 0xcda3452b26f49744L, 0x72790a252653f225L,
+                    0x9f8ea6be4ff231efL, 0x2a95cbe1c40b0fe9L, 0xd8e7239fe90daa8dL, 0x8828dc21a1ec9635L,
+                    0x3b0f343e895c642bL, 0x8b935a728e21d134L, 0xdec84687f9fedec0L, 0xfbf6be15ef1f2b97L,
+                    0x9a46a2ddbbf6d697L, 0x0bb2e54396b32d7cL, 0x80dbac0072f34633L, 0x343fee693c38db85L,
+                    0x14f6fa0287518153L, 0xc09a84f9a1b26197L, 0x09b257e0d0be4784L, 0xd13870d9410703c6L,
+                    0x4a5428ab4f0a16edL, 0xe089e6e6cf4ff84aL, 0x41473f06b79df0f3L, 0xc8620e2f443fd831L,
+                    0x170e9539f618fd88L, 0x8eb8e70ce5b18844L, 0xbd429d12f6886994L, 0xa50726552d16cd8dL,
+                    0xe6534e392bef0bf2L, 0x77e41ca7e1e3bdc1L, 0x08d24ebe01774c6dL, 0x42aae0536ce8daaeL,
+                    0x4d2790f2f934b5e0L, 0x9f3102e25874a2c4L, 0x4d7a5c745eba29bdL, 0xdd951065bc1b84b7L,
+                    0x9ba99966e4e55ae5L, 0x24c22788322d0a63L, 0x7e4553bacad3a606L, 0x717d7d11b6610246L,
                 }));
     }
 
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128MixTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128MixTest.java
index 289ec973..f7f23da7 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128MixTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128MixTest.java
@@ -69,65 +69,65 @@ class L64X128MixTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
+         * Reference data from JDK 19:
          * java.util.random.RandomGeneratorFactory.of("L64X128MixRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0x413b3d6c52481a65L, 0xc1231f1811655906L, 0x8827247f034c4e4dL, 0xea5508650a264226L,
+                    0xa2fc3db3faf20b60L, 0x0ca17f844355c30bL, 0x966393c3c699b9c4L, 0x26d0b369e961d05dL,
                 },
                 new long[] {
-                    0xb4d113f36ccdd3fdL, 0xf26e7cb5c0390ec4L, 0x973ff8d2debe46b8L, 0x962e44b59daf2169L,
-                    0x8c7dd11775e9d55bL, 0x8763b0cafcca658fL, 0x4d748b8631a75017L, 0x17498c7364f32942L,
-                    0x2c1738406e82f6efL, 0x02214c1f300ab893L, 0xbbab56a4020b1be9L, 0x7a7b6ae910f98bcfL,
-                    0xa37204aa89e828bbL, 0x46580e4586e88e53L, 0x812332dd546fd80aL, 0x747e1c1ef176795fL,
-                    0xeb75d2315f29f405L, 0x39c6bad2a694c815L, 0xa00747ccd4d49a88L, 0x4c0b4679cebac0b0L,
-                    0x689523cbfb9e5b40L, 0xf4798ac6780a1823L, 0x447c43ed041a52beL, 0x5878850e65d9f209L,
-                    0xca89aa2b7b279b30L, 0xe7b98710421b974aL, 0x9cd4a033438fbc3aL, 0xe91dc3036b57e0f4L,
-                    0xbb3ccb76d805cf70L, 0xf1b608bc99b17c4eL, 0x48ce8348ba47ff4aL, 0x12bf180fc386fdd3L,
-                    0x06fcbf5e8ed7f11bL, 0x951df66a7ff90fffL, 0x25e4ba22b1d2c97dL, 0xa2450ee7e234acbeL,
-                    0x206794d092392fb4L, 0x751bc3f1ba29a78fL, 0xcacd6a825354a2a5L, 0x9f807a742ddf3c2eL,
+                    0x431e95bfddd868f1L, 0x11d41649fc250a2bL, 0x386107fb4229f3c6L, 0x58809538283ec2beL,
+                    0x792d8502b636fa57L, 0xdfdd635a8d4b513bL, 0x639e33d9d46709a4L, 0xac064fae27c58ae2L,
+                    0xf503c18f9b81e221L, 0xc8e9239b41d75ac2L, 0x305035c93feb8da0L, 0xcb639286b0b77172L,
+                    0x134cb8dea2744fe3L, 0x849f85c7979eaaa8L, 0x7ec51bffd104b0b8L, 0xc9fb22d1f0ce8392L,
+                    0xdcbedf16be02f77dL, 0x8779acb6ffd5cb89L, 0x24be000a509e92ebL, 0x73b09559615c1540L,
+                    0x25f9fba5d4818f13L, 0x171607e2956fef8dL, 0x8950dc3f40d5f8cfL, 0xd11e7c72b36f1c72L,
+                    0xe687a38bb9887225L, 0x078daf1a151ba805L, 0x2aeb69f8638fda77L, 0xff50d66233a5078dL,
+                    0x9ed224880f7564a9L, 0x298f140cc162145dL, 0xeb2ba17c17e97b8fL, 0x59d785fd7c80a45bL,
+                    0x45afefc04e164b8fL, 0x6282afa6f7a13d16L, 0x59a5232c189d6c95L, 0x7c36546951518872L,
+                    0x7973a0bdd8a7d494L, 0x711c54e35cc6d30aL, 0xc931dd22fcc5e6a9L, 0x079e4436817465d5L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x2c41500c4a40464fL, 0x1e140b1f2d047426L, 0xb156162d454f4406L, 0x2b1f603431544f14L,
+                    0x36d2370e6207bab2L, 0xc4753d31834da409L, 0xecef76bb60e6f8daL, 0xb6b63fbeb3710b5eL,
                 },
                 new long[] {
-                    0x8ec1b80ecbdf6638L, 0x7d427e73692801feL, 0xa7d11c38e77bd3f9L, 0xb70a427f0f7b8242L,
-                    0x5b5aafca3afd3e77L, 0xb23cd1296d06029bL, 0x0eda6a18a61f04c7L, 0xa5dbdb8badbb0a19L,
-                    0xf482bcdd6bf246ecL, 0xdc3e5161265bd675L, 0x3dbf65ac75444016L, 0xaeabf78ddea24d43L,
-                    0x9a3e1aa6e98660ecL, 0x8719933d2a4f9d51L, 0x6a2c183328f2f108L, 0x8d6e6cb61bb7e254L,
-                    0x4123c3eb7a5a5e26L, 0x1c2d6e8ce8de78c4L, 0xf2f4d8ca8c529d88L, 0x6fed12ec6d63428fL,
-                    0x0c3404aa52cb98e0L, 0xebc4d88cedcd573cL, 0x6dacde15cde2938aL, 0x7faf0fc88902a4f4L,
-                    0x2cc7b1ed35a49de7L, 0xedfdb738b0b51f34L, 0xb7403fdcd5623f05L, 0x344dd5453feff140L,
-                    0x1cd944bd864e44ecL, 0xf3a728bb7bd944bbL, 0xac9e1c57f53166bfL, 0x77a1167656ff9afbL,
-                    0x3bf2621282d1fb4bL, 0x37730904ed22f5e3L, 0x357c76a47629e24dL, 0x0656773b6cac7efeL,
-                    0x1bcfa143e2649c7fL, 0x4907de5c28fcc710L, 0x8aff7d708155fdf9L, 0x697687aef87dd832L,
+                    0x4a3b46e4c46330c6L, 0x1edb14ee973103cbL, 0x82ac31b5cfd9b725L, 0xbaa145314d88b5c1L,
+                    0xced95922c6f6fdcfL, 0xdba6a91b0fb3ecc1L, 0x3d479c0083bc99e8L, 0x4935d8779f92155cL,
+                    0xb375363b0f724142L, 0x2a849a0a4d3328bbL, 0x13d9384867b9e73dL, 0x692a97c3730699c7L,
+                    0x1110586b1ba6aaf7L, 0x8b49b5c42008a6b4L, 0xb099f56ded714e73L, 0xe47202801ea2edeeL,
+                    0x90a3d0c6c4cd6616L, 0x69e27ce6f839bffeL, 0xd5f1dacba40dfa28L, 0xcbc3b8207d22ab3cL,
+                    0xbcfebfe31140ebcfL, 0xc5ade4d27d907a6eL, 0xa4c576fd470abdacL, 0x9a06630004e2434cL,
+                    0xe5c91ffe2e649403L, 0x79e8cde35d8a01c3L, 0xfe6e6a2eac80c265L, 0x5a906723692cf576L,
+                    0xef004a00e60db421L, 0xa15ee20151bb95f6L, 0x12cb5e8a4c7adaceL, 0x80172ad9c0ed3661L,
+                    0x492c31dc6ad30a4dL, 0x0ac761509dd595efL, 0x9349f08282fd74d8L, 0xd2dcbdbb42c1cfddL,
+                    0xcc21040c1e9d367bL, 0x62b448f73d61c8a4L, 0x567ef895e846cebdL, 0x8238e9fbccabbb44L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x69472c09433c4245L, 0xb86e7364396a5f5fL, 0xd826310863145d67L, 0x28545c212559142eL,
+                    0xc705d150b09c1f94L, 0xa828a2ba98ac9c61L, 0x343daac9fd050fdbL, 0xce65de67934aebadL,
                 },
                 new long[] {
-                    0xfa3f7883551b65c4L, 0x5537e7a29730dba9L, 0x171dfb4cdb51de33L, 0x55857dc286cee0b9L,
-                    0x232ae8dcad83fe7aL, 0x650afbab83268f46L, 0xc51c927f43e309d0L, 0x4b4bc38aedddeef9L,
-                    0x6c679933128f4adfL, 0x3a94141aeb654cbcL, 0xb9025dc647419e1eL, 0x0b6eeeecddf751aaL,
-                    0x3c0cb20257c3d1deL, 0x824ab0e63d512801L, 0xf4f11b8ff9792039L, 0xf0a712041f72b16dL,
-                    0x65232d0f0db89a31L, 0xde1dc59d9a3020deL, 0x012629ebd0e82e41L, 0x72bb791550469c08L,
-                    0x10acd0a730000863L, 0xf0dbdd652569feb1L, 0xb2a3505a6f8caadcL, 0x38b592bc58ffc6e2L,
-                    0xb79c9661f2a726f7L, 0x9fcc0d2b41cfd3ccL, 0x4bac2b22916e7805L, 0x19ddc2276290c8ffL,
-                    0x70a42053a130a2bbL, 0x915c2eec9a377a46L, 0x85b81aef329899f5L, 0xeddd96f8c61ae62dL,
-                    0xa8f7a4779614ca12L, 0x5ce66eb03e190499L, 0x845f24e22591c5e1L, 0xc26d1b8bd87d8009L,
-                    0xe894d1bb0e69824bL, 0x28c4c76880cec271L, 0xb887447c68200a4eL, 0xcb55ad59c43920cbL,
+                    0x86cbfd59d51c2b12L, 0x2015e74ab836e71fL, 0x76c59d63993224fbL, 0x5dfd3a311e5df341L,
+                    0xeb1654b961c05168L, 0xb0085df8d9127280L, 0xc9ec3f9c1ce14534L, 0x44cae5abad7cc428L,
+                    0xaac545985ef4a83dL, 0xbdffb30f032cc9aaL, 0x8309e6733ddef867L, 0x84b62aa79a9de881L,
+                    0x8ac5790bda006d61L, 0x2d66e83835309543L, 0x9a69810f00faad5eL, 0xfb52e0c7e2387ac6L,
+                    0xb7edafdec4002910L, 0x18b3feeac49b7e4eL, 0x43a4f03145408ca5L, 0x9dc51ffbaca77d03L,
+                    0xbb7ad1a943a1daceL, 0xc41841a02d67ceeaL, 0xb88033e5005f190eL, 0x79a40a956ed7d916L,
+                    0xc58bad848a86fee9L, 0x3a311ee2f4d9e712L, 0xe4b32160ddf8e17cL, 0x723d7ac41d2496aaL,
+                    0x96f96a92d33bc637L, 0x724b68f3e1d969e7L, 0x80edfd99dfc0ef39L, 0x7924f19f4d8bfb4eL,
+                    0x4fd956126608af2dL, 0xf81eb1b489993b23L, 0x05d2514191a38239L, 0x819dda6b5dd8eb2bL,
+                    0xb31d2eba66041796L, 0x196d3972d36f36b9L, 0x9ee7893afecfd4eeL, 0x2359a24a67a8e98bL,
                 }));
     }
 
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128StarStarTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128StarStarTest.java
index aad16ff0..a134a6f9 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128StarStarTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X128StarStarTest.java
@@ -74,66 +74,65 @@ class L64X128StarStarTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
-         * java.util.random.RandomGeneratorFactory.of("L64X128StarStarRandom").create(
-         * seed)
+         * Reference data from JDK 19:
+         * java.util.random.RandomGeneratorFactory.of("L64X128StarStarRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0x9a6735334f764669L, 0x02774b434710415eL, 0x90553f5a59676f25L, 0x590a4f291e16303fL,
+                    0xaee231d184911ad8L, 0x4520532a5549a510L, 0x71a6eb6f79366919L, 0x2083c44d4810bd6fL,
                 },
                 new long[] {
-                    0xfa2eda9a8503875eL, 0x40d2997cf3a8faa2L, 0xb782cb5e01cfbfe8L, 0x6f80294d7caccc20L,
-                    0x1415b29e01be890fL, 0xa7a184e3ae16d463L, 0xa27d0a5eac6f025cL, 0xa63c4bd5924f9c09L,
-                    0x91e045ca04392005L, 0x217117d21492258bL, 0xdcd5e74c08e9a8a6L, 0x9ae1eda89f8f8ce6L,
-                    0xb83d6fad06d9bccbL, 0xed96a0a8d3ba2232L, 0xd5a2730465123ec2L, 0x514212d2f65a3e68L,
-                    0x62439a2270b47780L, 0xa7a1a451402a983fL, 0xfaa331658e2610b2L, 0x5eb09511024e8962L,
-                    0xa98a44c94106f1d6L, 0x6350f0194244c038L, 0xc359b399832fd464L, 0x26a08f51b2caa80aL,
-                    0x4063c19cf92c8122L, 0x51a9e422a6cc8536L, 0x50412f9eb97447fdL, 0xd46551a24d3b3644L,
-                    0x9cb52774b1d76aeaL, 0x278a1794658b9809L, 0xe1e9901717b9935eL, 0xa7fc2b13259d8e1eL,
-                    0x9fe0ff858f44de81L, 0xd6f4f7217503f9b9L, 0xc341d1b3fe50029bL, 0x11b61829e61442d8L,
-                    0xabe181bddbc10dddL, 0xc1e84b3cda0c8cadL, 0x9f9ad08d6c2d04a2L, 0x1a69efc926ae734cL,
+                    0x830084a6413e9d08L, 0x9d3ad3573722e868L, 0xd64138313ff25b4fL, 0x345eda927a84a375L,
+                    0x7c20a3612b0c8fbeL, 0xab227b85595fb299L, 0x0c8a0567f166ea51L, 0xf5983403c41db8c3L,
+                    0x4eb1b4dd8d7663b0L, 0xb488ddd3113af675L, 0xd0a7849e601e7a14L, 0x881dd54f67e038a3L,
+                    0xf0f052f1c25c5140L, 0x50a63f651e394656L, 0x0e5c4b325f8e2e5fL, 0xf7768e8d250a834aL,
+                    0x6dd2857fab5822c8L, 0x261a1503b1799ed1L, 0xdc635cdfcb6b928eL, 0xfa41d9e29c8c35c9L,
+                    0xca56e6ec0e924af1L, 0xc9de942825743c7aL, 0xe975cbf2a1d60758L, 0x671044bedafa32deL,
+                    0x3b35dc7e2e583e6cL, 0x7cb03e41feecfc85L, 0x67972bdd63a30d60L, 0xf75b8f37d0b4717bL,
+                    0x0d833c09bba62056L, 0xfca3a08b9be878c3L, 0x4da8c219bd7fc0f9L, 0xeebabf6885853096L,
+                    0x65555aba641a0653L, 0x6a9f5c913a9ed878L, 0x99fbda7113e1354dL, 0x198cbfc3c00a0ca2L,
+                    0x7387aedc8b8b69d4L, 0x26c47d85244685c1L, 0x28065c272a6b0f55L, 0x6de39d4fca78f723L,
                 }),
             Arguments.of(
                 new long[] {
-                    0xac720a006d614309L, 0x3125364a71672453L, 0x3b31185c397d2e52L, 0xf01c3f7a25072270L,
+                    0x2c157477eb19cba9L, 0x26048e417b3694adL, 0x659d21b0cf0f005bL, 0x02bb00bb4faa6188L,
                 },
                 new long[] {
-                    0x95e9a605114380feL, 0xc4ca92a0d8f35896L, 0x96a303974cf302d0L, 0xb82c651679cc2fecL,
-                    0x0f2d0498c8eb3d69L, 0x0184f46152b5b87bL, 0x3b78c3105abf46b2L, 0xe438cffc7df8d357L,
-                    0xc2be744f5e0b57baL, 0xc81dcaecd52aaa2fL, 0x6d7ef235a564cc20L, 0x7fb08ae36375ecf8L,
-                    0x81040c0645bf581bL, 0xdbb8f4c78ea8b15fL, 0x13a108fe1d370c74L, 0xc93b297927a6e4aaL,
-                    0x197a4fc2cc535c25L, 0x5e800e1bb478ca01L, 0x638d5ac226fbfb4fL, 0xfaee78320b426b13L,
-                    0xe13dc9e43f84df48L, 0x392847cd9f4b2233L, 0x48a6e2e4636389d6L, 0xe0e53e0b19cec7beL,
-                    0xb6459258787c8829L, 0x83b00e03ec5abffcL, 0xe517275e6afab602L, 0x4febfc2f98abd21fL,
-                    0x8bbe2ef1dff25e6cL, 0x2167cbac37bef5b8L, 0xfd047e45396ca725L, 0x170d226283dd4ef6L,
-                    0x39690beb723b8d07L, 0x306116b9d06d5509L, 0x3f49cf45882f0f67L, 0xdeca8c6a4b085bf5L,
-                    0x0e3b1e52ff7506bfL, 0xc2656d2d8fd459c2L, 0x0e4148af436156afL, 0x806e4553f786cd7dL,
+                    0xb5f6cb871d993745L, 0x8261e85c8528b091L, 0x801adfbdd328d6a9L, 0x8e9089dc51c29de2L,
+                    0x2b0be99918898d84L, 0x97c205687d17d03cL, 0xf92e93c9b2f96d37L, 0xdc8f743d166b8bffL,
+                    0x99db57d3bd595c68L, 0xc93392d2fb587e46L, 0xc62445f3b2ed9294L, 0xe4252d2ec389dbe6L,
+                    0x369edad9d9b5651bL, 0xb2e0f52955f8a1bfL, 0xc9a1b6980b2c8ea8L, 0x40e4aa609c3bb19cL,
+                    0xfaede9c7002b035cL, 0xc00b77d1b7989058L, 0x243164c89302811dL, 0xcf47804a33ca4f9dL,
+                    0x15a1a6fc769a1a06L, 0x8be1729b907194ceL, 0xb943ef109365dec3L, 0x35070a31e43a522bL,
+                    0x7a29a9150d6a72b9L, 0x9c67a5bbb72d971bL, 0xf2b927381613bb56L, 0xa317e83d3332ed5aL,
+                    0x62f06a382579291cL, 0x065063eaf4967efdL, 0x4e0dbd771d7e9957L, 0xa1179b58c6d3a335L,
+                    0x30419a0f7114b910L, 0x144eb4c373807ac2L, 0xd0904239bc2793deL, 0xe426ba924a2099f2L,
+                    0xd013d7a457218234L, 0xe7ed5726a3141b1cL, 0xe5be2e06a8e623afL, 0xa9963ae2497e0c14L,
                 }),
             Arguments.of(
                 new long[] {
-                    0xaf735c18397e6947L, 0xda36353a6766765eL, 0x8874316d7b59490aL, 0xff31187b6059744cL,
+                    0xb84e2fb2f137f0d3L, 0x51a02981dca47a14L, 0xe176a5f236f46230L, 0xb841ae1033bb4ba1L,
                 },
                 new long[] {
-                    0xfa05c16dda52a826L, 0xe9c523f07c5cb2b4L, 0x13ae41d65b14107dL, 0xf3e1173f543e509dL,
-                    0xc43eb0c67d3495c5L, 0x44edd79d203d8293L, 0xf2fccfe48084fc20L, 0x3c77d17b4850f6fdL,
-                    0x83f79eb77a62bb37L, 0x987c4f75be4133e9L, 0x0ee529d1f73a2099L, 0x7c9639d659ae4079L,
-                    0x2d191c7096a1ac90L, 0x9e4606d9dccd30d1L, 0x850c3dfc9386ecb1L, 0x77a00fb6cf9fb824L,
-                    0xdfe307b7c9faa672L, 0x3c4ee316952584ceL, 0x5feaf6e782fa5602L, 0x23d0b7c0aa85e8f3L,
-                    0x66d9f669dffceadcL, 0x4c00536a1a4fd75bL, 0x08e54b8bb6e6c5f9L, 0x3453c08c4b422660L,
-                    0x513269dd9e520177L, 0xd86591fb64fdd9dcL, 0xb7753a837e7cf44dL, 0xde8bdc2fd2c8d37fL,
-                    0x535f5931cb5acc8dL, 0x4e2d0d0823d2a562L, 0x99a9874c01c4b261L, 0x322dbf9da83b96f7L,
-                    0x468fe390218f10d8L, 0xc7c7b4405e830136L, 0x926beae7a25fe30cL, 0x648ad95805c12f29L,
-                    0x94ed61e84f718d12L, 0xf57931fcb440dd42L, 0x6759dde6dbe42de8L, 0xe48db87e5f0df1dbL,
+                    0x813bb3b8ef5bfe77L, 0x93d1da33cc598a2cL, 0x641bdf12d424ed18L, 0xe9002256c8326374L,
+                    0xbfa7b1f649eebe70L, 0xa2a50c9b58d5b8a8L, 0x102d51f8895a250cL, 0x7f645e87d4c4aeb9L,
+                    0xc63a82d7347d97c1L, 0x93b0e513a347fdc5L, 0x9fbe539e9b811777L, 0xf0197ca328174abfL,
+                    0x9e0417be835df367L, 0x7a87a1e461c874ffL, 0x913ec6fbe78ff63dL, 0x62d24838cff9bd28L,
+                    0x19009f9566b627cbL, 0xf30e7ecc3cd4f372L, 0x8513d9f72faaeea6L, 0x02190ed9019ae371L,
+                    0xe1760616b1fd4efeL, 0x58a0960d45583134L, 0x377c9c9e0872d8dbL, 0x4cf6ec0f1ecfb91bL,
+                    0x54910aebb60facc2L, 0x7637e8286fc51437L, 0x15ed477ae483d7caL, 0x7acbbd2a4d1f2901L,
+                    0x9fc5ddd926500fb6L, 0x16c98971886a86aeL, 0xc61dcc20296a9228L, 0x90b4583569802b04L,
+                    0x8ffeb5b929c2d785L, 0xf35e8bfdccc70e97L, 0xc427ca7da8efc0d9L, 0x3d8fe39fcaf4b913L,
+                    0xd350ca35762a802cL, 0x340852a8b058cf12L, 0x073fa1debb4f835fL, 0xfacc317ecd1f047bL,
                 }));
     }
 
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X256MixTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X256MixTest.java
index 1792a10d..6cc6130f 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X256MixTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/L64X256MixTest.java
@@ -69,68 +69,68 @@ class L64X256MixTest extends AbstractLXMTest {
     @Override
     Stream<Arguments> getReferenceData() {
         /*
-         * Reference data from JDK 17:
+         * Reference data from JDK 19:
          * java.util.random.RandomGeneratorFactory.of("L64X256MixRandom").create(seed)
          *
          * Full byte[] seed created using SecureRandom.nextBytes. The seed was converted
-         * to long[] by filling the long bits sequentially starting at the most
-         * significant byte matching the method used by JDK 17. A sign extension bug in
-         * byte[] conversion required all byte indices (i % 8 != 0) to be non-negative.
-         * See: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282144
+         * to long[] by filling the long bits sequentially starting at the most significant
+         * byte matching the method used by the JDK, e.g.
+         * long[] result = new long[seed.length / Long.BYTES];
+         * ByteBuffer.wrap(seed).order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(result);
          *
          * Note: Seed order: LCG addition; LCG state; XBG state.
          */
         return Stream.of(
             Arguments.of(
                 new long[] {
-                    0x2249232b631c5a33L, 0x6231564c7b67752eL,
-                    0x5b241a23475c136bL, 0x611f57177c451714L, 0xe51a4670417c4929L, 0x83495b4512573b69L,
+                    0x38ad02a4977cfc85L, 0xac591a702af353a9L, 0xc18ee497ebfa3a67L, 0xc43728a4135dbf81L,
+                    0x501873d92a0ffc1eL, 0x21da5d9219a01f1dL,
                 },
                 new long[] {
-                    0x3b2581b0f7d47a44L, 0xae08c7439c0d9db8L, 0x667d577e8f0e7107L, 0xb127662052ba23dbL,
-                    0x283b9f648abff77dL, 0x8a79c3f4079291a7L, 0x0d569424123c789bL, 0x606769bee07389b4L,
-                    0x3ae004db1868e7d9L, 0x87cc2ca9fc7652acL, 0xc8f6be5980ad6a86L, 0x9bd9dcdbefb172beL,
-                    0x11e9c9fbca8109dcL, 0xd5e93ef6b9b2869fL, 0xafc5ad654ddadfeaL, 0xac02c6fd5734a004L,
-                    0x7bb48191736c2ee2L, 0xef3267674750942fL, 0x408d1e4a979ece93L, 0x28df1363bfbdc13cL,
-                    0x8e9018d64bb35ccaL, 0x1429a15115d3e447L, 0xa48b9d1f30d5c5dfL, 0x7341fddce66d825fL,
-                    0x1dcda0c69b88240fL, 0x5e3e88b0fa0cf62eL, 0xb31b0fd05fb0ceffL, 0x27f6cfa05d602b21L,
-                    0x2aa55a37ec2dd1a9L, 0xb9ecd3176de5aba0L, 0x0b60a5d210e80bfeL, 0xec3ae0690b5d36d0L,
-                    0xd36827e33c2610afL, 0x443701f20b0b55b9L, 0x9c44bc2e173606efL, 0x682bbfa8c8a76b12L,
-                    0xcbb50c8f008184d4L, 0x9a8f4dc4ace9dab7L, 0x635dbc0bba0acf56L, 0x2be7233ba0af3755L,
+                    0x4a8fc9b294a2903bL, 0xe124abe9a71662ecL, 0xfc9ca7d4e1c2b278L, 0x612395c98dfbf451L,
+                    0x131004a7cf4033f8L, 0x7d182d5855d1e58eL, 0xba7ccd83d224206dL, 0xc5e270c4ce67cbd3L,
+                    0x9123f5d85e0e8746L, 0xc94f94c5880b6537L, 0x827cfda9abc85255L, 0xce74ef6578c18d8cL,
+                    0xcf9a3c36d733a4a8L, 0xcf56df43d5ffff86L, 0x9cfb645b362f65a5L, 0xabf301bec6e25ac4L,
+                    0xff95d6c7fe60dd77L, 0x69f593186b882b82L, 0x86b35b9cfad7970cL, 0xdbfca7884f3f7f13L,
+                    0x2b9eb4307e26e1bbL, 0x31efdc45759d5be5L, 0x28b33884e8407e1dL, 0xec98fe1c2c05f0bcL,
+                    0x071969a499ad9c2aL, 0xc85430fc3a9c2649L, 0x978cb0eb9d3a6d16L, 0xc5bf174c7b9aea3bL,
+                    0x3da95559360b1c16L, 0x2ef8870aff685d0cL, 0xac7324e58579b175L, 0x6bf70e58e0f2e963L,
+                    0xe1114a1cdde29c1eL, 0x1a8b54c562541b08L, 0xa9529fb0c9bb9c3aL, 0x373a68e6f14e6b2dL,
+                    0x4e96f36a49fac53cL, 0xeb1fe0f59197fb33L, 0x1e8b4d4daa3f3311L, 0x97ff0d70df1ce349L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x5a6a3e055b336673L, 0x1c48321c3f450a4bL,
-                    0x573d392b6d444672L, 0x391a0b7e7256257eL, 0xe3553c7338183a4bL, 0xb3453524327b474eL,
+                    0x13ca7c4d76bad8f0L, 0x602bf3584414eee4L, 0x3e769cf3ba98660dL, 0x61a95d3d58ed469dL,
+                    0x6fc2fc2f5b0921cbL, 0x774d52db376df887L,
                 },
                 new long[] {
-                    0x497c9968fb30b55aL, 0x88b701c7c8a5ce87L, 0xc647de6f7c945818L, 0x15455e0da4e225cbL,
-                    0x05a8121c5ac13fb6L, 0xc7a2840d44d85358L, 0x035682005f927ac5L, 0x5c02d2bc69806329L,
-                    0x357b8b489e7dd1ceL, 0x31a3b0cb1e7ab647L, 0xc430e7726d89bfa5L, 0x7ff2b9985ce138b6L,
-                    0xc9d6a64623ceee4eL, 0x66d9f22310afd121L, 0x4947bd5dffa51e31L, 0x37643d00b4886c04L,
-                    0x87f629915e305f6fL, 0x219bcd75cbc0285aL, 0xe4c1297b5211a25aL, 0x40e1183164eac5ebL,
-                    0x09d9430c9b1b6987L, 0x992314f2bcda24f9L, 0x089ae6cd57c799c2L, 0xa00587bdd329cba0L,
-                    0xcb8b06012ff9b1daL, 0x42e9337d8d2cecd4L, 0x614bd447dff91cf6L, 0xa8544ea46a034e04L,
-                    0x92ff39c62c2d86efL, 0x2c1906c4b204a841L, 0xaa703346273b7e65L, 0x4c56a1e60ac062e2L,
-                    0x699d07dcece2f142L, 0xebec46c7fcf2854cL, 0xd474b44306a4ffa0L, 0xc2ec5ad575f8f2a1L,
-                    0x9465c39accfc4119L, 0x3848d247b91666baL, 0x746b4f3707e3d8b7L, 0x95a6a969a95f06bbL,
+                    0x84c5ab78c40ac14cL, 0x1d616aaae3399f43L, 0xab1a55821b3f4dc1L, 0x8bf9a5c970dbf38bL,
+                    0x6fd9452a2dc3da53L, 0x896200532a13b11aL, 0x0c139f2ab4a12593L, 0xb9410309e3750ba9L,
+                    0xaa18856fa85517d9L, 0xb36310525d77e950L, 0x0ffa217a0a56025bL, 0x0b948fe6b5d95704L,
+                    0x3856404d4cf0ddc8L, 0x7c40f0f8a37b7467L, 0xdee45d9ab52003d0L, 0xfc2d9bd0ea1df302L,
+                    0xb9c36154e4c2c927L, 0xc38a3cd9cbd64f86L, 0x80d06dd216397eb2L, 0x94568be37b47a23fL,
+                    0xfedaf933d0ff15c2L, 0x207af70fcf265696L, 0x68f117e04406c116L, 0x798da2b4d1d1bc07L,
+                    0x664bb84977d2914bL, 0xe95c00e85f03bee5L, 0x2468f9cb7e0c2eefL, 0xa3234bafd0d327cfL,
+                    0xa64292c604374ef1L, 0xfde0c87c9e66f469L, 0x040437b68311143dL, 0x793d144161c5a82cL,
+                    0xfc8d06776d37b1d1L, 0x643d0d646a26b7a3L, 0xc0cff6fc7f434038L, 0xf8658db199d75217L,
+                    0xc34ec05c7964404aL, 0x63e8e02d10e0ca82L, 0x7c18e1e8281ff5acL, 0x82e7a4ef6040d9e1L,
                 }),
             Arguments.of(
                 new long[] {
-                    0x54400165483f2e3fL, 0x9a15215939207347L,
-                    0xf2356277031d321eL, 0x84424261090c5f65L, 0x6971605d2e512524L, 0xda2440670153601fL,
+                    0x95cef6dd0f721028L, 0x62729b1796f20c67L, 0x3326bb36f96c995fL, 0x7cca88f294ea8828L,
+                    0xcd1baff0c8a55c31L, 0xb8b30298127cafc0L,
                 },
                 new long[] {
-                    0x8b1d7efc7fc06c1eL, 0x66d5acbd0eb82506L, 0x1ae1b0593b508681L, 0xb5257bc2cd864b10L,
-                    0x3b3ce25dba52b1ecL, 0xeba1c30537df5fb8L, 0x6de3e0b4727488f6L, 0x5cc1339198afa780L,
-                    0x53d7e6a0df40863dL, 0x29a12cf9852cd019L, 0x5a0063a3c5fb8edcL, 0x83877b4357d7bba9L,
-                    0x31927eacbf38d044L, 0x4b5b4edb1239316cL, 0xb2972e6b23a169d2L, 0x8a1b11d5aeb8e987L,
-                    0x9a43065171f7e6a3L, 0x0d1429e90174c8d3L, 0x569bbb67381c91faL, 0x54873f0e39ce40d6L,
-                    0x069ba230fdb29a2aL, 0xd3cbd59ae9ac652aL, 0xf82cbb27a9150de1L, 0x0013470c201fceaaL,
-                    0xf8d1b0b50662e153L, 0x57dcaa907fd596d4L, 0x400e840591ba1d54L, 0x5f7735e9f6904c01L,
-                    0x7a34f1dc7b3229a5L, 0x7aa5499d4f712524L, 0x0784bc58e37fec70L, 0x93770a8e29acb2d2L,
-                    0x9fcc1756e91b4c28L, 0xacfb91b7aac01d92L, 0x3ed26f0091a74012L, 0x3daffd2afe73d286L,
-                    0x4199ca7739b26126L, 0xd96d30747880bb7bL, 0x479432cba5b5f450L, 0x4b0aac6c79480b96L,
+                    0x6a6d6b182a973476L, 0xb1c8fe6c748abeb1L, 0x8feda649365ec1a8L, 0xd6fc825213db401eL,
+                    0x5abfd540f73ebbe6L, 0x9b5ba437f32b8bd4L, 0xba19cac6c2e0b57dL, 0x81cd25461c2c6869L,
+                    0x0a2ca0730e59d25eL, 0xc4a7794c6f1dd5ffL, 0x4acb6cbb120e5980L, 0x27db228fb1e7e793L,
+                    0x07857cffa09d2ae4L, 0xb1f1291e2853c4c6L, 0xb3201971b3cb2cc8L, 0xbfb40ab19721f445L,
+                    0xb247334ccee1f857L, 0xa13ac1de01fb83b3L, 0x686b00fa750819d5L, 0x2fcd849ed7921c82L,
+                    0xda27960205f0704fL, 0xd11a3299f8af4c44L, 0xb1a23ef67d2f567cL, 0xd5ca5a9e0e4977bcL,
+                    0x9786640a1bcd0104L, 0x43da7cef69ea3cb3L, 0x3e11acd367e77bdeL, 0xc61349825af6400fL,
+                    0xbb6813fb3ce2ef4aL, 0x623c0fbf7b03d348L, 0xf14656bcf51235f1L, 0xd924702149fcd0c1L,
+                    0x8d0674793d656071L, 0x9f0520e73fa64387L, 0x9c5abce00783f3faL, 0xe9f65611774feab8L,
+                    0x4758118eef111e09L, 0xbfbe22a0b12f1be2L, 0x9ca2ce5f7a74bb75L, 0x80500fe93a8a0938L,
                 }));
     }
 


[commons-rng] 03/04: Update user guide performance tables to include new RNGs

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 54dc197b42397e9be78f380e0885f9d05ab84dc3
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Sep 27 14:39:00 2022 +0100

    Update user guide performance tables to include new RNGs
    
    Tables have been regenerated using JDK 11 LTS (11.0.16).
---
 src/site/apt/userguide/rng.apt | 220 ++++++++++++++++++++++++-----------------
 1 file changed, 127 insertions(+), 93 deletions(-)

diff --git a/src/site/apt/userguide/rng.apt b/src/site/apt/userguide/rng.apt
index f68d451d..b79f1d3f 100644
--- a/src/site/apt/userguide/rng.apt
+++ b/src/site/apt/userguide/rng.apt
@@ -748,9 +748,9 @@ double[] coordinate = sampler.sample();
 
   * CPU: Intel(R) Xeon(R) CPU E5-1680 v3 @ 3.20GHz
 
-  * Java version: 11.0.11 (build 11.0.11+9-Ubuntu-0ubuntu2.18.04)
+  * Java version: 11.0.16 (build 11.0.16+8-post-Ubuntu-0ubuntu118.04)
 
-  * JVM: OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
+  * JVM: OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)
 
   []
 
@@ -793,96 +793,113 @@ double[] coordinate = sampler.sample();
 *-----------------------+---------:---------:---------:---------:---------:
 | JDK                   | 1.00000 | 1.00000 | 1.00000 | 1.00000 | 1.00000 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_512_A            | 0.86402 | 0.60693 | 0.58188 | 0.90384 | 0.75071 |
+| WELL_512_A            | 1.11461 | 0.59987 | 0.58102 | 0.87589 | 0.75203 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_1024_A           | 0.86388 | 0.60828 | 0.59958 | 0.88274 | 0.74776 |
+| WELL_1024_A           | 1.36841 | 0.60740 | 0.59623 | 0.89262 | 0.74222 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_19937_A          | 0.88988 | 1.06880 | 0.74541 | 1.08759 | 1.01921 |
+| WELL_19937_A          | 1.08024 | 0.76173 | 0.74484 | 1.08742 | 1.02213 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_19937_C          | 0.96359 | 1.12042 | 1.05941 | 1.16671 | 1.09697 |
+| WELL_19937_C          | 1.32791 | 1.02451 | 0.79133 | 1.17066 | 1.09529 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_44497_A          | 0.95675 | 1.15532 | 0.78623 | 1.13154 | 1.09113 |
+| WELL_44497_A          | 1.32461 | 1.02395 | 0.78924 | 1.12883 | 1.09717 |
 *-----------------------+---------:---------:---------:---------:---------:
-| WELL_44497_B          | 0.91684 | 1.15418 | 1.13382 | 1.22034 | 1.16970 |
+| WELL_44497_B          | 1.33975 | 1.09410 | 0.86264 | 1.22877 | 1.17148 |
 *-----------------------+---------:---------:---------:---------:---------:
-| MT                    | 0.82989 | 0.52224 | 0.44964 | 0.60830 | 0.48265 |
+| MT                    | 1.08968 | 0.50325 | 0.44883 | 0.59148 | 0.48715 |
 *-----------------------+---------:---------:---------:---------:---------:
-| ISAAC                 | 0.84781 | 0.58197 | 0.51948 | 0.67855 | 0.55926 |
+| ISAAC                 | 1.04350 | 0.59010 | 0.53097 | 0.90597 | 0.56016 |
 *-----------------------+---------:---------:---------:---------:---------:
-| SPLIT_MIX_64          | 0.96235 | 0.13699 | 0.09643 | 0.33235 | 0.20923 |
+| SPLIT_MIX_64          | 1.40526 | 0.13745 | 0.09556 | 0.32604 | 0.21787 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XOR_SHIFT_1024_S      | 0.96123 | 0.19587 | 0.15853 | 0.37570 | 0.26650 |
+| XOR_SHIFT_1024_S      | 1.33565 | 0.19589 | 0.15776 | 0.37325 | 0.26841 |
 *-----------------------+---------:---------:---------:---------:---------:
-| TWO_CMRES             | 0.95608 | 0.19519 | 0.17358 | 0.37450 | 0.30337 |
+| TWO_CMRES             | 1.27146 | 0.19437 | 0.17278 | 0.37910 | 0.30381 |
 *-----------------------+---------:---------:---------:---------:---------:
-| MT_64                 | 0.98801 | 0.28645 | 0.24561 | 0.48280 | 0.39021 |
+| MT_64                 | 1.41411 | 0.28240 | 0.24923 | 0.47918 | 0.37518 |
 *-----------------------+---------:---------:---------:---------:---------:
-| MWC_256               | 0.81238 | 0.29592 | 0.22886 | 0.40414 | 0.29229 |
+| MWC_256               | 0.92836 | 0.29161 | 0.22826 | 0.41015 | 0.29642 |
 *-----------------------+---------:---------:---------:---------:---------:
-| KISS                  | 0.88957 | 0.42380 | 0.40907 | 0.60295 | 0.44828 |
+| KISS                  | 0.97299 | 0.41728 | 0.40927 | 0.60185 | 0.45477 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XOR_SHIFT_1024_S_PHI  | 0.96496 | 0.19677 | 0.16308 | 0.38483 | 0.27410 |
+| XOR_SHIFT_1024_S_PHI  | 1.32728 | 0.19677 | 0.15789 | 0.36337 | 0.26868 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_64_S     | 0.71032 | 0.19955 | 0.13541 | 0.26562 | 0.19459 |
+| XO_RO_SHI_RO_64_S     | 0.89088 | 0.19783 | 0.13549 | 0.26151 | 0.20178 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_64_SS    | 0.73114 | 0.25744 | 0.17889 | 0.30716 | 0.24538 |
+| XO_RO_SHI_RO_64_SS    | 0.89907 | 0.25505 | 0.17562 | 0.30908 | 0.25002 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_128_PLUS    | 0.71463 | 0.26545 | 0.17640 | 0.35726 | 0.30646 |
+| XO_SHI_RO_128_PLUS    | 0.92138 | 0.26290 | 0.17695 | 0.35388 | 0.30901 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_128_SS      | 0.73703 | 0.34062 | 0.26054 | 0.43150 | 0.32369 |
+| XO_SHI_RO_128_SS      | 0.94245 | 0.33710 | 0.25896 | 0.43273 | 0.32846 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_PLUS | 0.87696 | 0.10816 | 0.09039 | 0.26954 | 0.18147 |
+| XO_RO_SHI_RO_128_PLUS | 1.34781 | 0.10860 | 0.08962 | 0.25963 | 0.17839 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_SS   | 0.85067 | 0.13921 | 0.11392 | 0.30151 | 0.21111 |
+| XO_RO_SHI_RO_128_SS   | 1.34709 | 0.13777 | 0.11315 | 0.29280 | 0.20425 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_256_PLUS    | 0.87421 | 0.15098 | 0.13089 | 0.31737 | 0.22558 |
+| XO_SHI_RO_256_PLUS    | 1.36885 | 0.15035 | 0.13031 | 0.31551 | 0.22234 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_256_SS      | 0.86555 | 0.18615 | 0.14146 | 0.35710 | 0.26417 |
+| XO_SHI_RO_256_SS      | 1.36178 | 0.18242 | 0.14083 | 0.33548 | 0.25444 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_512_PLUS    | 0.97947 | 0.26187 | 0.19926 | 0.44657 | 0.34867 |
+| XO_SHI_RO_512_PLUS    | 1.35392 | 0.24760 | 0.19849 | 0.40975 | 0.35794 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_512_SS      | 0.90862 | 0.29358 | 0.23317 | 0.46902 | 0.37684 |
+| XO_SHI_RO_512_SS      | 1.36391 | 0.28976 | 0.23257 | 0.42100 | 0.37262 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_XSH_RR_32         | 0.81135 | 0.32678 | 0.26683 | 0.40447 | 0.21463 |
+| PCG_XSH_RR_32         | 0.97803 | 0.32336 | 0.26250 | 0.40892 | 0.21951 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_XSH_RS_32         | 0.79817 | 0.25671 | 0.19597 | 0.29838 | 0.21886 |
+| PCG_XSH_RS_32         | 0.98559 | 0.25332 | 0.19727 | 0.29730 | 0.22179 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_RXS_M_XS_64       | 0.97269 | 0.13942 | 0.11515 | 0.33045 | 0.22792 |
+| PCG_RXS_M_XS_64       | 1.38272 | 0.13825 | 0.11401 | 0.32616 | 0.22109 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_MCG_XSH_RR_32     | 0.79093 | 0.31560 | 0.27463 | 0.39070 | 0.18625 |
+| PCG_MCG_XSH_RR_32     | 0.98173 | 0.31553 | 0.27401 | 0.38673 | 0.19127 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_MCG_XSH_RS_32     | 0.79866 | 0.22801 | 0.18213 | 0.27391 | 0.18528 |
+| PCG_MCG_XSH_RS_32     | 0.97713 | 0.22620 | 0.18129 | 0.27693 | 0.19128 |
 *-----------------------+---------:---------:---------:---------:---------:
-| MSWS                  | 0.79004 | 0.19081 | 0.15263 | 0.26363 | 0.16781 |
+| MSWS                  | 1.14544 | 0.18920 | 0.15237 | 0.26609 | 0.17483 |
 *-----------------------+---------:---------:---------:---------:---------:
-| SFC_32                | 0.79758 | 0.28023 | 0.19260 | 0.36425 | 0.30252 |
+| SFC_32                | 0.90771 | 0.27679 | 0.19194 | 0.36690 | 0.30937 |
 *-----------------------+---------:---------:---------:---------:---------:
-| SFC_64                | 0.97023 | 0.15152 | 0.13384 | 0.31544 | 0.22750 |
+| SFC_64                | 1.24542 | 0.15066 | 0.13172 | 0.30157 | 0.22107 |
 *-----------------------+---------:---------:---------:---------:---------:
-| JSF_32                | 0.80505 | 0.24810 | 0.16857 | 0.33234 | 0.27814 |
+| JSF_32                | 1.14519 | 0.24544 | 0.16966 | 0.32851 | 0.28360 |
 *-----------------------+---------:---------:---------:---------:---------:
-| JSF_64                | 0.97155 | 0.14810 | 0.12784 | 0.32045 | 0.22510 |
+| JSF_64                | 1.24219 | 0.14705 | 0.12808 | 0.30411 | 0.21567 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_128_PP      | 0.72362 | 0.30529 | 0.22045 | 0.40125 | 0.32129 |
+| XO_SHI_RO_128_PP      | 0.91119 | 0.30224 | 0.22359 | 0.39342 | 0.32205 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_PP   | 0.97466 | 0.12362 | 0.10651 | 0.29539 | 0.19848 |
+| XO_RO_SHI_RO_128_PP   | 1.23874 | 0.12269 | 0.10495 | 0.27554 | 0.19165 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_256_PP      | 0.85161 | 0.16629 | 0.14086 | 0.33508 | 0.24565 |
+| XO_SHI_RO_256_PP      | 1.38254 | 0.18221 | 0.13768 | 0.32843 | 0.24371 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_SHI_RO_512_PP      | 0.90850 | 0.27933 | 0.21365 | 0.44303 | 0.34134 |
+| XO_SHI_RO_512_PP      | 1.37576 | 0.27996 | 0.21466 | 0.39719 | 0.37026 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_PP  | 0.89438 | 0.21264 | 0.16979 | 0.37433 | 0.29543 |
+| XO_RO_SHI_RO_1024_PP  | 1.38428 | 0.20780 | 0.16899 | 0.38017 | 0.28539 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_S   | 1.01342 | 0.20593 | 0.16127 | 0.38820 | 0.31113 |
+| XO_RO_SHI_RO_1024_S   | 1.36140 | 0.20379 | 0.16047 | 0.38798 | 0.29636 |
 *-----------------------+---------:---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_SS  | 0.90822 | 0.22750 | 0.18391 | 0.42179 | 0.32040 |
+| XO_RO_SHI_RO_1024_SS  | 1.37634 | 0.21938 | 0.18260 | 0.39993 | 0.29927 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_XSH_RR_32_OS      | 0.80363 | 0.33087 | 0.26299 | 0.40915 | 0.21547 |
+| PCG_XSH_RR_32_OS      | 0.97903 | 0.32323 | 0.26342 | 0.40666 | 0.22412 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_XSH_RS_32_OS      | 0.80818 | 0.25504 | 0.19917 | 0.29506 | 0.21605 |
+| PCG_XSH_RS_32_OS      | 0.97764 | 0.25234 | 0.19507 | 0.29867 | 0.22140 |
 *-----------------------+---------:---------:---------:---------:---------:
-| PCG_RXS_M_XS_64_OS    | 0.95663 | 0.13954 | 0.11474 | 0.34339 | 0.22711 |
+| PCG_RXS_M_XS_64_OS    | 1.38334 | 0.13917 | 0.11581 | 0.32657 | 0.22231 |
 *-----------------------+---------:---------:---------:---------:---------:
+| L64_X128_SS           | 1.37881 | 0.20132 | 0.15051 | 0.37165 | 0.28290 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L64_X128_MIX          | 1.41965 | 0.24710 | 0.18779 | 0.40333 | 0.31450 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L64_X256_MIX          | 1.40043 | 0.28843 | 0.22641 | 0.43458 | 0.36224 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L64_X1024_MIX         | 1.31032 | 0.31798 | 0.25004 | 0.49949 | 0.42021 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L128_X128_MIX         | 1.46235 | 0.41459 | 0.39984 | 0.60225 | 0.60025 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L128_X256_MIX         | 1.45053 | 0.42359 | 0.40235 | 0.62181 | 0.62422 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L128_X1024_MIX        | 1.46674 | 0.43250 | 0.41553 | 0.62237 | 0.62227 |
+*-----------------------+---------:---------:---------:---------:---------:
+| L32_X64_MIX           | 0.95378 | 0.42086 | 0.37200 | 0.57229 | 0.38774 |
+*-----------------------+---------:---------:---------:---------:---------:
+
 
   Notes:
 
@@ -904,98 +921,115 @@ double[] coordinate = sampler.sample();
 *-----------------------*---------*---------*---------*---------*
 || RNG identifier       || <<<BoxMullerNormalizedGaussianSampler>>> || <<<MarsagliaNormalizedGaussianSampler>>> || <<<ZigguratNormalizedGaussianSampler>>> || <<<ZigguratSampler.NormalizedGaussian>>> ||
 *-----------------------+---------:---------:---------:---------:
-| JDK                   | 0.72960 | 0.82726 | 0.36034 | 0.36594 |
+| JDK                   | 0.72864 | 0.82035 | 0.36026 | 0.37240 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_512_A            | 0.57505 | 0.60375 | 0.26339 | 0.26691 |
+| WELL_512_A            | 0.57513 | 0.60603 | 0.27574 | 0.26031 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_1024_A           | 0.60722 | 0.66397 | 0.25735 | 0.28947 |
+| WELL_1024_A           | 0.60669 | 0.64716 | 0.25733 | 0.26244 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_19937_A          | 0.70014 | 0.77367 | 0.32644 | 0.37284 |
+| WELL_19937_A          | 0.70086 | 0.75437 | 0.39599 | 0.34672 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_19937_C          | 0.73280 | 0.80029 | 0.35167 | 0.34601 |
+| WELL_19937_C          | 0.71438 | 0.81312 | 0.35042 | 0.33974 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_44497_A          | 0.72547 | 0.78209 | 0.34695 | 0.33866 |
+| WELL_44497_A          | 0.70695 | 0.78274 | 0.34627 | 0.35930 |
 *-----------------------+---------:---------:---------:---------:
-| WELL_44497_B          | 0.72918 | 0.82947 | 0.36505 | 0.35621 |
+| WELL_44497_B          | 0.73477 | 0.81227 | 0.37086 | 0.35371 |
 *-----------------------+---------:---------:---------:---------:
-| MT                    | 0.52754 | 0.51164 | 0.21106 | 0.20436 |
+| MT                    | 0.53583 | 0.51641 | 0.21284 | 0.19978 |
 *-----------------------+---------:---------:---------:---------:
-| ISAAC                 | 0.56170 | 0.48109 | 0.23012 | 0.28953 |
+| ISAAC                 | 0.55638 | 0.53112 | 0.22969 | 0.24661 |
 *-----------------------+---------:---------:---------:---------:
-| SPLIT_MIX_64          | 0.45853 | 0.29775 | 0.09276 | 0.10007 |
+| SPLIT_MIX_64          | 0.45178 | 0.30374 | 0.09349 | 0.09665 |
 *-----------------------+---------:---------:---------:---------:
-| XOR_SHIFT_1024_S      | 0.45084 | 0.31954 | 0.11359 | 0.11822 |
+| XOR_SHIFT_1024_S      | 0.44582 | 0.31782 | 0.11948 | 0.11923 |
 *-----------------------+---------:---------:---------:---------:
-| TWO_CMRES             | 0.44604 | 0.45215 | 0.16317 | 0.11966 |
+| TWO_CMRES             | 0.44569 | 0.40012 | 0.15777 | 0.12335 |
 *-----------------------+---------:---------:---------:---------:
-| MT_64                 | 0.49571 | 0.39487 | 0.15460 | 0.14215 |
+| MT_64                 | 0.49332 | 0.39600 | 0.17076 | 0.14266 |
 *-----------------------+---------:---------:---------:---------:
-| MWC_256               | 0.45701 | 0.34790 | 0.14493 | 0.14848 |
+| MWC_256               | 0.45679 | 0.34753 | 0.14330 | 0.14594 |
 *-----------------------+---------:---------:---------:---------:
-| KISS                  | 0.47452 | 0.49177 | 0.18818 | 0.19008 |
+| KISS                  | 0.47298 | 0.48791 | 0.18812 | 0.19092 |
 *-----------------------+---------:---------:---------:---------:
-| XOR_SHIFT_1024_S_PHI  | 0.44445 | 0.31489 | 0.11357 | 0.10101 |
+| XOR_SHIFT_1024_S_PHI  | 0.44456 | 0.31603 | 0.11946 | 0.12211 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_64_S     | 0.61000 | 0.32099 | 0.11795 | 0.12022 |
+| XO_RO_SHI_RO_64_S     | 0.63187 | 0.32096 | 0.11796 | 0.11563 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_64_SS    | 0.62240 | 0.34639 | 0.14055 | 0.12145 |
+| XO_RO_SHI_RO_64_SS    | 0.62738 | 0.34528 | 0.14085 | 0.13715 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_128_PLUS    | 0.44880 | 0.33467 | 0.13964 | 0.14341 |
+| XO_SHI_RO_128_PLUS    | 0.45069 | 0.33461 | 0.13998 | 0.13917 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_128_SS      | 0.46776 | 0.42087 | 0.15093 | 0.19142 |
+| XO_SHI_RO_128_SS      | 0.46666 | 0.42353 | 0.15621 | 0.15369 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_PLUS | 0.41386 | 0.32831 | 0.08397 | 0.06587 |
+| XO_RO_SHI_RO_128_PLUS | 0.41110 | 0.28271 | 0.08406 | 0.08578 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_SS   | 0.43247 | 0.29724 | 0.09210 | 0.08266 |
+| XO_RO_SHI_RO_128_SS   | 0.43201 | 0.29328 | 0.09216 | 0.09695 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_256_PLUS    | 0.42889 | 0.28577 | 0.09739 | 0.10846 |
+| XO_SHI_RO_256_PLUS    | 0.42893 | 0.28613 | 0.09728 | 0.10625 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_256_SS      | 0.55705 | 0.29863 | 0.11750 | 0.11747 |
+| XO_SHI_RO_256_SS      | 0.55701 | 0.29316 | 0.11777 | 0.11569 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_512_PLUS    | 0.41934 | 0.30780 | 0.12565 | 0.14333 |
+| XO_SHI_RO_512_PLUS    | 0.41901 | 0.30672 | 0.13528 | 0.13637 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_512_SS      | 0.44370 | 0.32466 | 0.14411 | 0.15220 |
+| XO_SHI_RO_512_SS      | 0.44332 | 0.32406 | 0.13255 | 0.14975 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_XSH_RR_32         | 0.63410 | 0.46234 | 0.15671 | 0.18239 |
+| PCG_XSH_RR_32         | 0.63853 | 0.46199 | 0.16100 | 0.14618 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_XSH_RS_32         | 0.62983 | 0.34835 | 0.13539 | 0.13785 |
+| PCG_XSH_RS_32         | 0.62500 | 0.35912 | 0.13526 | 0.12871 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_RXS_M_XS_64       | 0.44525 | 0.30162 | 0.10544 | 0.08468 |
+| PCG_RXS_M_XS_64       | 0.45670 | 0.30098 | 0.09328 | 0.09883 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_MCG_XSH_RR_32     | 0.64318 | 0.43756 | 0.15998 | 0.16262 |
+| PCG_MCG_XSH_RR_32     | 0.63831 | 0.43842 | 0.15828 | 0.15012 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_MCG_XSH_RS_32     | 0.62282 | 0.34499 | 0.13120 | 0.12769 |
+| PCG_MCG_XSH_RS_32     | 0.62252 | 0.34500 | 0.12497 | 0.12172 |
 *-----------------------+---------:---------:---------:---------:
-| MSWS                  | 0.58998 | 0.32404 | 0.10121 | 0.09632 |
+| MSWS                  | 0.58977 | 0.32080 | 0.10982 | 0.10874 |
 *-----------------------+---------:---------:---------:---------:
-| SFC_32                | 0.43872 | 0.33976 | 0.14265 | 0.14272 |
+| SFC_32                | 0.43940 | 0.34021 | 0.14306 | 0.12439 |
 *-----------------------+---------:---------:---------:---------:
-| SFC_64                | 0.41387 | 0.28437 | 0.09873 | 0.10294 |
+| SFC_64                | 0.41754 | 0.28430 | 0.09697 | 0.08781 |
 *-----------------------+---------:---------:---------:---------:
-| JSF_32                | 0.44054 | 0.33002 | 0.13119 | 0.13472 |
+| JSF_32                | 0.44026 | 0.32928 | 0.12811 | 0.13261 |
 *-----------------------+---------:---------:---------:---------:
-| JSF_64                | 0.42458 | 0.28166 | 0.09720 | 0.11124 |
+| JSF_64                | 0.42437 | 0.28102 | 0.09989 | 0.10300 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_128_PP      | 0.59677 | 0.34647 | 0.14639 | 0.15166 |
+| XO_SHI_RO_128_PP      | 0.59633 | 0.34603 | 0.14808 | 0.14888 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_128_PP   | 0.41813 | 0.28479 | 0.09439 | 0.07803 |
+| XO_RO_SHI_RO_128_PP   | 0.41775 | 0.27995 | 0.08859 | 0.09678 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_256_PP      | 0.43298 | 0.33660 | 0.10280 | 0.12387 |
+| XO_SHI_RO_256_PP      | 0.43340 | 0.29711 | 0.10289 | 0.11488 |
 *-----------------------+---------:---------:---------:---------:
-| XO_SHI_RO_512_PP      | 0.43075 | 0.32065 | 0.13512 | 0.14562 |
+| XO_SHI_RO_512_PP      | 0.42602 | 0.32023 | 0.12673 | 0.14101 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_PP  | 0.44627 | 0.31655 | 0.11478 | 0.11779 |
+| XO_RO_SHI_RO_1024_PP  | 0.43407 | 0.31549 | 0.11515 | 0.11791 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_S   | 0.43809 | 0.30567 | 0.11276 | 0.11266 |
+| XO_RO_SHI_RO_1024_S   | 0.43494 | 0.30470 | 0.11188 | 0.11259 |
 *-----------------------+---------:---------:---------:---------:
-| XO_RO_SHI_RO_1024_SS  | 0.44230 | 0.32953 | 0.12806 | 0.12668 |
+| XO_RO_SHI_RO_1024_SS  | 0.44134 | 0.32623 | 0.12696 | 0.12791 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_XSH_RR_32_OS      | 0.63575 | 0.48396 | 0.16101 | 0.17263 |
+| PCG_XSH_RR_32_OS      | 0.63818 | 0.46323 | 0.15676 | 0.17173 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_XSH_RS_32_OS      | 0.63155 | 0.34915 | 0.13603 | 0.11617 |
+| PCG_XSH_RS_32_OS      | 0.62963 | 0.34848 | 0.13540 | 0.12839 |
 *-----------------------+---------:---------:---------:---------:
-| PCG_RXS_M_XS_64_OS    | 0.45576 | 0.30088 | 0.11437 | 0.08057 |
+| PCG_RXS_M_XS_64_OS    | 0.44982 | 0.30106 | 0.09104 | 0.09866 |
 *-----------------------+---------:---------:---------:---------:
+| L64_X128_SS           | 0.45983 | 0.31177 | 0.11647 | 0.11647 |
+*-----------------------+---------:---------:---------:---------:
+| L64_X128_MIX          | 0.45649 | 0.33868 | 0.13662 | 0.13702 |
+*-----------------------+---------:---------:---------:---------:
+| L64_X256_MIX          | 0.46925 | 0.34798 | 0.14384 | 0.14019 |
+*-----------------------+---------:---------:---------:---------:
+| L64_X1024_MIX         | 0.47994 | 0.37118 | 0.16070 | 0.15674 |
+*-----------------------+---------:---------:---------:---------:
+| L128_X128_MIX         | 0.52488 | 0.51651 | 0.18264 | 0.19039 |
+*-----------------------+---------:---------:---------:---------:
+| L128_X256_MIX         | 0.52286 | 0.54631 | 0.20215 | 0.19860 |
+*-----------------------+---------:---------:---------:---------:
+| L128_X1024_MIX        | 0.51316 | 0.48730 | 0.23322 | 0.20935 |
+*-----------------------+---------:---------:---------:---------:
+| L32_X64_MIX           | 0.48315 | 0.47286 | 0.17991 | 0.18868 |
+*-----------------------+---------:---------:---------:---------:
+
 
   Notes:
 


[commons-rng] 01/04: Use randomly chosen high-quality RNG for the sampling tests

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit e309e825f7de290928ef321915c7d083977f73de
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Sep 27 10:47:36 2022 +0100

    Use randomly chosen high-quality RNG for the sampling tests
    
    RNGs are chosen from those that pass TestU01 BigCrush and PractRand to 4
    TiB of output.
---
 .../rng/sampling/CollectionSamplerTest.java        |   2 +-
 .../rng/sampling/CombinationSamplerTest.java       |   2 +-
 .../DiscreteProbabilityCollectionSamplerTest.java  |   2 +-
 .../commons/rng/sampling/ObjectSamplerTest.java    |   2 +-
 .../rng/sampling/PermutationSamplerTest.java       |   2 +-
 .../apache/commons/rng/sampling/RandomAssert.java  |  56 ++++++++++-
 .../AliasMethodDiscreteSamplerTest.java            |   4 +-
 .../distribution/ContinuousSamplerTest.java        |   3 +-
 .../distribution/ContinuousSamplersList.java       | 108 ++++++++++-----------
 .../distribution/ContinuousUniformSamplerTest.java |   2 +-
 .../distribution/DirichletSamplerTest.java         |   2 +-
 .../sampling/distribution/DiscreteSamplerTest.java |   3 +-
 .../distribution/DiscreteSamplersList.java         |  66 ++++++-------
 .../distribution/DiscreteUniformSamplerTest.java   |   2 +-
 .../FastLoadedDiceRollerDiscreteSamplerTest.java   |   6 +-
 .../GuideTableDiscreteSamplerTest.java             |   4 +-
 .../rng/sampling/distribution/LongSamplerTest.java |   3 +-
 .../MarsagliaTsangWangDiscreteSamplerTest.java     |   2 +-
 .../sampling/distribution/StableSamplerTest.java   |   4 +-
 .../distribution/UniformLongSamplerTest.java       |   2 +-
 .../rng/sampling/shape/TriangleSamplerTest.java    |   2 +-
 21 files changed, 168 insertions(+), 111 deletions(-)

diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
index 3853cccf..1dbd7ca9 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
@@ -39,7 +39,7 @@ class CollectionSamplerTest {
         list.add("RNG");
 
         final CollectionSampler<String> sampler =
-            new CollectionSampler<>(RandomSource.MWC_256.create(), list);
+            new CollectionSampler<>(RandomAssert.createRNG(), list);
         final String word = sampler.sample();
         for (final String w : list) {
             if (word.equals(w)) {
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
index 237cdc9d..58826319 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
@@ -30,7 +30,7 @@ import org.apache.commons.rng.simple.RandomSource;
  * Tests for {@link CombinationSampler}.
  */
 class CombinationSamplerTest {
-    private final UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
+    private final UniformRandomProvider rng = RandomAssert.createRNG();
 
     @Test
     void testSampleIsInDomain() {
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
index f41d7b32..c1b2c578 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
@@ -33,7 +33,7 @@ import org.apache.commons.rng.simple.RandomSource;
  */
 class DiscreteProbabilityCollectionSamplerTest {
     /** RNG. */
-    private final UniformRandomProvider rng = RandomSource.XO_SHI_RO_128_PP.create();
+    private final UniformRandomProvider rng = RandomAssert.createRNG();
 
     @Test
     void testPrecondition1() {
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ObjectSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ObjectSamplerTest.java
index 7fc14662..9c50a324 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ObjectSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ObjectSamplerTest.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.ValueSource;
 class ObjectSamplerTest {
     @Test
     void testSamplesUnlimitedSize() {
-        final ObjectSampler<Double> s = RandomSource.SPLIT_MIX_64.create()::nextDouble;
+        final ObjectSampler<Double> s = RandomAssert.createRNG()::nextDouble;
         Assertions.assertEquals(Long.MAX_VALUE, s.samples().spliterator().estimateSize());
     }
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
index e632974b..0987ab90 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
@@ -37,7 +37,7 @@ class PermutationSamplerTest {
     void testSampleTrivial() {
         final int n = 6;
         final int k = 3;
-        final PermutationSampler sampler = new PermutationSampler(RandomSource.KISS.create(),
+        final PermutationSampler sampler = new PermutationSampler(RandomAssert.createRNG(),
                                                                   n, k);
         final int[] random = sampler.sample();
         SAMPLE: for (final int s : random) {
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
index 0ea4a6de..c63ea9c8 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/RandomAssert.java
@@ -18,10 +18,13 @@
 package org.apache.commons.rng.sampling;
 
 import org.junit.jupiter.api.Assertions;
-
+import java.util.EnumSet;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
 import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
 import org.apache.commons.rng.sampling.distribution.LongSampler;
+import org.apache.commons.rng.simple.RandomSource;
 
 /**
  * Utility class for testing random samplers.
@@ -30,6 +33,37 @@ public final class RandomAssert {
     /** Number of samples to generate to test for equal sequences. */
     private static final int SAMPLES = 10;
 
+    /** The sources for a new random generator instance. */
+    private static final RandomSource[] SOURCES;
+
+    static {
+        final EnumSet<RandomSource> set = EnumSet.allOf(RandomSource.class);
+        // Remove all generators that do not pass Test U01 BigCrush or
+        // fail PractRand before 4 TiB of output.
+        // See: https://commons.apache.org/proper/commons-rng/userguide/rng.html#a5._Quality
+        set.remove(RandomSource.JDK);
+        set.remove(RandomSource.WELL_512_A);
+        set.remove(RandomSource.WELL_1024_A);
+        set.remove(RandomSource.WELL_19937_A);
+        set.remove(RandomSource.WELL_19937_C);
+        set.remove(RandomSource.WELL_44497_A);
+        set.remove(RandomSource.WELL_44497_B);
+        set.remove(RandomSource.MT);
+        set.remove(RandomSource.XOR_SHIFT_1024_S);
+        set.remove(RandomSource.TWO_CMRES);
+        set.remove(RandomSource.TWO_CMRES_SELECT);
+        set.remove(RandomSource.MT_64);
+        set.remove(RandomSource.XOR_SHIFT_1024_S_PHI);
+        set.remove(RandomSource.XO_RO_SHI_RO_64_S);
+        set.remove(RandomSource.XO_SHI_RO_128_PLUS);
+        set.remove(RandomSource.XO_RO_SHI_RO_128_PLUS);
+        set.remove(RandomSource.XO_SHI_RO_256_PLUS);
+        set.remove(RandomSource.XO_SHI_RO_512_PLUS);
+        set.remove(RandomSource.PCG_MCG_XSH_RS_32);
+        set.remove(RandomSource.XO_RO_SHI_RO_1024_S);
+        SOURCES = set.toArray(new RandomSource[0]);
+    }
+
     /**
      * Class contains only static methods.
      */
@@ -115,4 +149,24 @@ public final class RandomAssert {
     private static boolean isArray(Object object) {
         return object != null && object.getClass().isArray();
     }
+
+    /**
+     * Create a new random generator instance. The implementation will be randomly chosen
+     * from a selection of high-quality generators.
+     *
+     * <p>This is a helper method to return a generator for use in testing where the
+     * underlying source should not impact the test. This ensures the test is robust upon
+     * repeat invocation across different JVM instances where the generator will most
+     * likely be different.
+     *
+     * <p>Note that use of this method is preferable to use of a fixed seed generator. Any
+     * test that is flaky when using this method may require an update to the test
+     * assumptions and assertions.
+     *
+     * @return the uniform random provider
+     * @see RandomSource#create()
+     */
+    public static UniformRandomProvider createRNG() {
+        return SOURCES[ThreadLocalRandom.current().nextInt(SOURCES.length)].create();
+    }
 }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
index efc127b2..86f8553a 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
@@ -83,7 +83,7 @@ class AliasMethodDiscreteSamplerTest {
      * @return the alias method discrete sampler
      */
     private static SharedStateDiscreteSampler createSampler(double[] probabilities) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         return AliasMethodDiscreteSampler.of(rng, probabilities, -1);
     }
 
@@ -134,7 +134,7 @@ class AliasMethodDiscreteSamplerTest {
     @Test
     void testNonUniformSamplesWithProbabilitiesWithDefaultFactoryConstructor() {
         final double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3};
-        checkSamples(AliasMethodDiscreteSampler.of(RandomSource.SPLIT_MIX_64.create(), expected), expected);
+        checkSamples(AliasMethodDiscreteSampler.of(RandomAssert.createRNG(), expected), expected);
     }
 
     /**
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTest.java
index 0222abfb..16e6d964 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTest.java
@@ -17,6 +17,7 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import java.util.concurrent.ThreadLocalRandom;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.RepeatedTest;
@@ -30,7 +31,7 @@ import org.junit.jupiter.params.provider.ValueSource;
 class ContinuousSamplerTest {
     @Test
     void testSamplesUnlimitedSize() {
-        final ContinuousSampler s = RandomSource.SPLIT_MIX_64.create()::nextDouble;
+        final ContinuousSampler s = RandomAssert.createRNG()::nextDouble;
         Assertions.assertEquals(Long.MAX_VALUE, s.samples().spliterator().estimateSize());
     }
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
index b93cbcce..ac363592 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
@@ -21,7 +21,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.apache.commons.rng.sampling.RandomAssert;
 
 /**
  * List of samplers.
@@ -45,179 +45,179 @@ public final class ContinuousSamplersList {
             final double meanNormal = -123.45;
             final double sigmaNormal = 6.789;
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                RandomSource.KISS.create());
+                RandomAssert.createRNG());
             // Gaussian (DEPRECATED "Box-Muller").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                new BoxMullerGaussianSampler(RandomSource.MT.create(), meanNormal, sigmaNormal));
+                new BoxMullerGaussianSampler(RandomAssert.createRNG(), meanNormal, sigmaNormal));
             // Gaussian ("Box-Muller").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                GaussianSampler.of(new BoxMullerNormalizedGaussianSampler(RandomSource.MT.create()),
+                GaussianSampler.of(new BoxMullerNormalizedGaussianSampler(RandomAssert.createRNG()),
                                    meanNormal, sigmaNormal));
             // Gaussian ("Marsaglia").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                GaussianSampler.of(new MarsagliaNormalizedGaussianSampler(RandomSource.MT.create()),
+                GaussianSampler.of(new MarsagliaNormalizedGaussianSampler(RandomAssert.createRNG()),
                                    meanNormal, sigmaNormal));
             // Gaussian ("Ziggurat").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                GaussianSampler.of(new ZigguratNormalizedGaussianSampler(RandomSource.MT.create()),
+                GaussianSampler.of(new ZigguratNormalizedGaussianSampler(RandomAssert.createRNG()),
                                    meanNormal, sigmaNormal));
             // Gaussian ("Modified ziggurat").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, meanNormal, sigmaNormal),
-                GaussianSampler.of(ZigguratSampler.NormalizedGaussian.of(RandomSource.MT.create()),
+                GaussianSampler.of(ZigguratSampler.NormalizedGaussian.of(RandomAssert.createRNG()),
                                    meanNormal, sigmaNormal));
 
             // Beta ("inverse method").
             final double alphaBeta = 4.3;
             final double betaBeta = 2.1;
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(unusedRng, alphaBeta, betaBeta),
-                RandomSource.ISAAC.create());
+                RandomAssert.createRNG());
             // Beta ("Cheng").
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(unusedRng, alphaBeta, betaBeta),
-                ChengBetaSampler.of(RandomSource.MWC_256.create(), alphaBeta, betaBeta));
+                ChengBetaSampler.of(RandomAssert.createRNG(), alphaBeta, betaBeta));
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(unusedRng, betaBeta, alphaBeta),
-                ChengBetaSampler.of(RandomSource.WELL_19937_A.create(), betaBeta, alphaBeta));
+                ChengBetaSampler.of(RandomAssert.createRNG(), betaBeta, alphaBeta));
             // Beta ("Cheng", alternate algorithm).
             final double alphaBetaAlt = 0.5678;
             final double betaBetaAlt = 0.1234;
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(unusedRng, alphaBetaAlt, betaBetaAlt),
-                ChengBetaSampler.of(RandomSource.WELL_512_A.create(), alphaBetaAlt, betaBetaAlt));
+                ChengBetaSampler.of(RandomAssert.createRNG(), alphaBetaAlt, betaBetaAlt));
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(unusedRng, betaBetaAlt, alphaBetaAlt),
-                ChengBetaSampler.of(RandomSource.WELL_19937_C.create(), betaBetaAlt, alphaBetaAlt));
+                ChengBetaSampler.of(RandomAssert.createRNG(), betaBetaAlt, alphaBetaAlt));
 
             // Cauchy ("inverse method").
             final double medianCauchy = 0.123;
             final double scaleCauchy = 4.5;
             add(LIST, new org.apache.commons.math3.distribution.CauchyDistribution(unusedRng, medianCauchy, scaleCauchy),
-                RandomSource.WELL_19937_C.create());
+                RandomAssert.createRNG());
 
             // Chi-square ("inverse method").
             final int dofChi2 = 12;
             add(LIST, new org.apache.commons.math3.distribution.ChiSquaredDistribution(unusedRng, dofChi2),
-                RandomSource.WELL_19937_A.create());
+                RandomAssert.createRNG());
 
             // Exponential ("inverse method").
             final double meanExp = 3.45;
             add(LIST, new org.apache.commons.math3.distribution.ExponentialDistribution(unusedRng, meanExp),
-                RandomSource.WELL_44497_A.create());
+                RandomAssert.createRNG());
             // Exponential.
             add(LIST, new org.apache.commons.math3.distribution.ExponentialDistribution(unusedRng, meanExp),
-                AhrensDieterExponentialSampler.of(RandomSource.MT.create(), meanExp));
+                AhrensDieterExponentialSampler.of(RandomAssert.createRNG(), meanExp));
             // Exponential ("Modified ziggurat").
             add(LIST, new org.apache.commons.math3.distribution.ExponentialDistribution(unusedRng, meanExp),
-                ZigguratSampler.Exponential.of(RandomSource.XO_RO_SHI_RO_128_SS.create(), meanExp));
+                ZigguratSampler.Exponential.of(RandomAssert.createRNG(), meanExp));
 
             // F ("inverse method").
             final int numDofF = 4;
             final int denomDofF = 7;
             add(LIST, new org.apache.commons.math3.distribution.FDistribution(unusedRng, numDofF, denomDofF),
-                RandomSource.MT_64.create());
+                RandomAssert.createRNG());
 
             // Gamma ("inverse method").
             final double alphaGammaSmallerThanOne = 0.1234;
             final double alphaGammaLargerThanOne = 2.345;
             final double thetaGamma = 3.456;
             add(LIST, new org.apache.commons.math3.distribution.GammaDistribution(unusedRng, alphaGammaLargerThanOne, thetaGamma),
-                RandomSource.SPLIT_MIX_64.create());
+                RandomAssert.createRNG());
             // Gamma (alpha < 1).
             add(LIST, new org.apache.commons.math3.distribution.GammaDistribution(unusedRng, alphaGammaSmallerThanOne, thetaGamma),
-                AhrensDieterMarsagliaTsangGammaSampler.of(RandomSource.XOR_SHIFT_1024_S_PHI.create(),
+                AhrensDieterMarsagliaTsangGammaSampler.of(RandomAssert.createRNG(),
                                                           alphaGammaSmallerThanOne, thetaGamma));
             // Gamma (alpha > 1).
             add(LIST, new org.apache.commons.math3.distribution.GammaDistribution(unusedRng, alphaGammaLargerThanOne, thetaGamma),
-                AhrensDieterMarsagliaTsangGammaSampler.of(RandomSource.WELL_44497_B.create(),
+                AhrensDieterMarsagliaTsangGammaSampler.of(RandomAssert.createRNG(),
                                                           alphaGammaLargerThanOne, thetaGamma));
 
             // Gumbel ("inverse method").
             final double muGumbel = -4.56;
             final double betaGumbel = 0.123;
             add(LIST, new org.apache.commons.math3.distribution.GumbelDistribution(unusedRng, muGumbel, betaGumbel),
-                RandomSource.WELL_1024_A.create());
+                RandomAssert.createRNG());
 
             // Laplace ("inverse method").
             final double muLaplace = 12.3;
             final double betaLaplace = 5.6;
             add(LIST, new org.apache.commons.math3.distribution.LaplaceDistribution(unusedRng, muLaplace, betaLaplace),
-                RandomSource.MWC_256.create());
+                RandomAssert.createRNG());
 
             // Levy ("inverse method").
             final double muLevy = -1.098;
             final double cLevy = 0.76;
             add(LIST, new org.apache.commons.math3.distribution.LevyDistribution(unusedRng, muLevy, cLevy),
-                RandomSource.TWO_CMRES.create());
+                RandomAssert.createRNG());
             // Levy sampler
             add(LIST, new org.apache.commons.math3.distribution.LevyDistribution(unusedRng, muLevy, cLevy),
-                LevySampler.of(RandomSource.JSF_64.create(), muLevy, cLevy));
+                LevySampler.of(RandomAssert.createRNG(), muLevy, cLevy));
             add(LIST, new org.apache.commons.math3.distribution.LevyDistribution(unusedRng, 0.0, 1.0),
-                LevySampler.of(RandomSource.JSF_64.create(), 0.0, 1.0));
+                LevySampler.of(RandomAssert.createRNG(), 0.0, 1.0));
 
             // Log normal ("inverse method").
             final double muLogNormal = 2.345;
             final double sigmaLogNormal = 0.1234;
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal, sigmaLogNormal),
-                RandomSource.KISS.create());
+                RandomAssert.createRNG());
             // Log-normal (DEPRECATED "Box-Muller").
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal, sigmaLogNormal),
-                new BoxMullerLogNormalSampler(RandomSource.XOR_SHIFT_1024_S_PHI.create(), muLogNormal, sigmaLogNormal));
+                new BoxMullerLogNormalSampler(RandomAssert.createRNG(), muLogNormal, sigmaLogNormal));
             // Log-normal ("Box-Muller").
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal, sigmaLogNormal),
-                LogNormalSampler.of(new BoxMullerNormalizedGaussianSampler(RandomSource.XOR_SHIFT_1024_S_PHI.create()),
+                LogNormalSampler.of(new BoxMullerNormalizedGaussianSampler(RandomAssert.createRNG()),
                                     muLogNormal, sigmaLogNormal));
             // Log-normal ("Marsaglia").
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal, sigmaLogNormal),
-                LogNormalSampler.of(new MarsagliaNormalizedGaussianSampler(RandomSource.MT_64.create()),
+                LogNormalSampler.of(new MarsagliaNormalizedGaussianSampler(RandomAssert.createRNG()),
                                     muLogNormal, sigmaLogNormal));
             // Log-normal ("Ziggurat").
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal, sigmaLogNormal),
-                LogNormalSampler.of(new ZigguratNormalizedGaussianSampler(RandomSource.MWC_256.create()),
+                LogNormalSampler.of(new ZigguratNormalizedGaussianSampler(RandomAssert.createRNG()),
                                     muLogNormal, sigmaLogNormal));
             // Log-normal negative mean
             final double muLogNormal2 = -1.1;
             final double sigmaLogNormal2 = 2.3;
             add(LIST, new org.apache.commons.math3.distribution.LogNormalDistribution(unusedRng, muLogNormal2, sigmaLogNormal2),
-                    LogNormalSampler.of(new ZigguratNormalizedGaussianSampler(RandomSource.MWC_256.create()),
+                    LogNormalSampler.of(new ZigguratNormalizedGaussianSampler(RandomAssert.createRNG()),
                                         muLogNormal2, sigmaLogNormal2));
 
             // Logistic ("inverse method").
             final double muLogistic = -123.456;
             final double sLogistic = 7.89;
             add(LIST, new org.apache.commons.math3.distribution.LogisticDistribution(unusedRng, muLogistic, sLogistic),
-                RandomSource.TWO_CMRES_SELECT.create((Object) null, 2, 6));
+                RandomAssert.createRNG());
 
             // Nakagami ("inverse method").
             final double muNakagami = 78.9;
             final double omegaNakagami = 23.4;
             final double inverseAbsoluteAccuracyNakagami = org.apache.commons.math3.distribution.NakagamiDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY;
             add(LIST, new org.apache.commons.math3.distribution.NakagamiDistribution(unusedRng, muNakagami, omegaNakagami, inverseAbsoluteAccuracyNakagami),
-                RandomSource.TWO_CMRES_SELECT.create((Object) null, 5, 3));
+                RandomAssert.createRNG());
 
             // Pareto ("inverse method").
             final double scalePareto = 23.45;
             final double shapePareto = 0.1234;
             add(LIST, new org.apache.commons.math3.distribution.ParetoDistribution(unusedRng, scalePareto, shapePareto),
-                RandomSource.TWO_CMRES_SELECT.create((Object) null, 9, 11));
+                RandomAssert.createRNG());
             // Pareto.
             add(LIST, new org.apache.commons.math3.distribution.ParetoDistribution(unusedRng, scalePareto, shapePareto),
-                InverseTransformParetoSampler.of(RandomSource.XOR_SHIFT_1024_S_PHI.create(), scalePareto, shapePareto));
+                InverseTransformParetoSampler.of(RandomAssert.createRNG(), scalePareto, shapePareto));
 
             // Stable distributions.
             // Gaussian case: alpha=2
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, 0, Math.sqrt(2)),
-                StableSampler.of(RandomSource.MSWS.create(), 2, 0));
+                StableSampler.of(RandomAssert.createRNG(), 2, 0));
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(unusedRng, 3.4, 0.75 * Math.sqrt(2)),
-                    StableSampler.of(RandomSource.MSWS.create(), 2, 0, 0.75, 3.4));
+                    StableSampler.of(RandomAssert.createRNG(), 2, 0, 0.75, 3.4));
             // Cauchy case: alpha=1, beta=0, gamma=2.73, delta=0.87
             add(LIST, new org.apache.commons.math3.distribution.CauchyDistribution(unusedRng, 0.87, 2.73),
-                StableSampler.of(RandomSource.KISS.create(), 1, 0, 2.73, 0.87));
+                StableSampler.of(RandomAssert.createRNG(), 1, 0, 2.73, 0.87));
             // Levy case: alpha=0.5, beta=0, gamma=5.7, delta=-1.23
             // The 0-parameterization requires the reference distribution (1-parameterization) is shifted:
             // S0(Z) = S1(Z) + gamma * beta * tan(pi * alpha / 2); gamma = 5.7, beta = -1, alpha = 0.5
             // = gamma * -1 * tan(pi/4) = -gamma
             add(LIST, new org.apache.commons.math3.distribution.LevyDistribution(unusedRng, -1.23 - 5.7, 5.7),
-                StableSampler.of(RandomSource.JSF_64.create(), 0.5, 1.0, 5.7, -1.23));
+                StableSampler.of(RandomAssert.createRNG(), 0.5, 1.0, 5.7, -1.23));
             // Levy case: alpha=0.5, beta=0.
             // The 0-parameterization requires the reference distribution is shifted by -tan(pi/4) = -1
             add(LIST, new org.apache.commons.math3.distribution.LevyDistribution(unusedRng, -1.0, 1.0),
-                    StableSampler.of(RandomSource.JSF_64.create(), 0.5, 1.0, 1.0, 0.0));
+                    StableSampler.of(RandomAssert.createRNG(), 0.5, 1.0, 1.0, 0.0));
 
             // No Stable distribution in Commons Math: Deciles computed using Nolan's STABLE program:
             // https://edspace.american.edu/jpnolan/stable/
@@ -226,41 +226,41 @@ public final class ContinuousSamplersList {
             add(LIST, new double[] {-8.95069776039550, -7.89186827865320, -7.25070352695719, -6.71497820795024,
                 -6.19542020516881, -5.63245847779003, -4.94643432673952, -3.95462242999135,
                 -1.90020994991840, Double.POSITIVE_INFINITY},
-                StableSampler.of(RandomSource.JSF_64.create(), 1.3, 0.4, 1.5, -6.4));
+                StableSampler.of(RandomAssert.createRNG(), 1.3, 0.4, 1.5, -6.4));
             // General case (alpha < 1): alpha=0.8, beta=-0.3, gamma=0.75, delta=3.25
             add(LIST, new double[] {-1.60557902637291, 1.45715153372767, 2.39577970333297, 2.86274746879986,
                 3.15907259287483, 3.38633464572309, 3.60858199662215, 3.96001854555454, 5.16261950198042,
                 Double.POSITIVE_INFINITY},
-                StableSampler.of(RandomSource.XO_SHI_RO_512_PP.create(), 0.8, -0.3, 0.75, 3.25));
+                StableSampler.of(RandomAssert.createRNG(), 0.8, -0.3, 0.75, 3.25));
             // Alpha 1 case: alpha=1.0, beta=0.3
             add(LIST, new double[] {-2.08189340389400, -0.990511737972781, -0.539025554211755, -0.204710171216492,
                 0.120388569770401, 0.497197960523146, 1.01228394387185, 1.89061920660563, 4.20559140293206,
                 Double.POSITIVE_INFINITY},
-                StableSampler.of(RandomSource.XO_SHI_RO_512_SS.create(), 1.0, 0.3));
+                StableSampler.of(RandomAssert.createRNG(), 1.0, 0.3));
             // Symmetric case (beta=0): alpha=1.3, beta=0.0
             add(LIST, new double[] {-2.29713832179280, -1.26781259700375, -0.739212223404616, -0.346771353386198,
                 0.00000000000000, 0.346771353386198, 0.739212223404616, 1.26781259700376, 2.29713832179280,
                 Double.POSITIVE_INFINITY},
-                StableSampler.of(RandomSource.XO_SHI_RO_512_PLUS.create(), 1.3, 0.0));
+                StableSampler.of(RandomAssert.createRNG(), 1.3, 0.0));
 
             // This is the smallest alpha where the CDF can be reliably computed.
             // Small alpha case: alpha=0.1, beta=-0.2
             add(LIST, new double[] {-14345498.0855558, -4841.68845914421, -22.6430159400915, -0.194461655962062,
                 0.299822962206354E-1, 0.316768853375197E-1, 0.519382255860847E-1, 21.8595769961580,
                 147637.033822552, Double.POSITIVE_INFINITY},
-                StableSampler.of(RandomSource.XO_SHI_RO_512_PLUS.create(), 0.1, -0.2));
+                StableSampler.of(RandomAssert.createRNG(), 0.1, -0.2));
 
             // T ("inverse method").
             final double dofT = 0.76543;
             add(LIST, new org.apache.commons.math3.distribution.TDistribution(unusedRng, dofT),
-                RandomSource.ISAAC.create());
+                RandomAssert.createRNG());
             // T.
             add(LIST, new org.apache.commons.math3.distribution.TDistribution(unusedRng, dofT),
-                TSampler.of(RandomSource.SFC_64.create(), dofT));
+                TSampler.of(RandomAssert.createRNG(), dofT));
             // T with 'large' degrees of freedom.
             final double dofTlarge = 30;
             add(LIST, new org.apache.commons.math3.distribution.TDistribution(unusedRng, dofTlarge),
-                TSampler.of(RandomSource.XO_SHI_RO_256_PP.create(), dofTlarge));
+                TSampler.of(RandomAssert.createRNG(), dofTlarge));
             // T with 'huge' degrees of freedom (approaches a normal distribution).
             // Deciles are computed incorrectly using Commons Math; values computed using Matlab.
             // Note: DF is below the switch to using a normal distribution.
@@ -268,29 +268,29 @@ public final class ContinuousSamplersList {
             add(LIST, new double[] {-1.2815515655446015, -0.84162123357291463, -0.52440051270804089,
                 -0.25334710313579983, 0, 0.25334710313579983, 0.52440051270804089, 0.84162123357291474,
                 1.2815515655446015, Double.POSITIVE_INFINITY},
-                TSampler.of(RandomSource.XO_SHI_RO_256_SS.create(), dofTHuge));
+                TSampler.of(RandomAssert.createRNG(), dofTHuge));
 
             // Triangular ("inverse method").
             final double aTriangle = -0.76543;
             final double cTriangle = -0.65432;
             final double bTriangle = -0.54321;
             add(LIST, new org.apache.commons.math3.distribution.TriangularDistribution(unusedRng, aTriangle, cTriangle, bTriangle),
-                RandomSource.MT.create());
+                RandomAssert.createRNG());
 
             // Uniform ("inverse method").
             final double loUniform = -1.098;
             final double hiUniform = 0.76;
             add(LIST, new org.apache.commons.math3.distribution.UniformRealDistribution(unusedRng, loUniform, hiUniform),
-                RandomSource.TWO_CMRES.create());
+                RandomAssert.createRNG());
             // Uniform.
             add(LIST, new org.apache.commons.math3.distribution.UniformRealDistribution(unusedRng, loUniform, hiUniform),
-                ContinuousUniformSampler.of(RandomSource.MT_64.create(), loUniform, hiUniform));
+                ContinuousUniformSampler.of(RandomAssert.createRNG(), loUniform, hiUniform));
 
             // Weibull ("inverse method").
             final double alphaWeibull = 678.9;
             final double betaWeibull = 98.76;
             add(LIST, new org.apache.commons.math3.distribution.WeibullDistribution(unusedRng, alphaWeibull, betaWeibull),
-                RandomSource.WELL_44497_B.create());
+                RandomAssert.createRNG());
         } catch (Exception e) {
             // CHECKSTYLE: stop Regexp
             System.err.println("Unexpected exception while creating the list of samplers: " + e);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
index 688ada0d..5f9f7e3e 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
@@ -34,7 +34,7 @@ class ContinuousUniformSamplerTest {
     void testNoRestrictionOnOrderOfLowAndHighParameters() {
         final double low = 3.18;
         final double high = 5.23;
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         testSampleInRange(rng, low, high);
         testSampleInRange(rng, high, low);
     }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
index 9c75a7ef..db6ca875 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DirichletSamplerTest.java
@@ -193,7 +193,7 @@ class DirichletSamplerTest {
      */
     private static void assertSamples(double... alpha) {
         // No fixed seed. Failed tests will be repeated by the JUnit test runner.
-        final UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final DirichletSampler sampler = DirichletSampler.of(rng, alpha);
         final int k = alpha.length;
         final double[][] samples = new double[100000][];
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTest.java
index 029d1a4e..3e52f931 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTest.java
@@ -17,6 +17,7 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import java.util.concurrent.ThreadLocalRandom;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.RepeatedTest;
@@ -30,7 +31,7 @@ import org.junit.jupiter.params.provider.ValueSource;
 class DiscreteSamplerTest {
     @Test
     void testSamplesUnlimitedSize() {
-        final DiscreteSampler s = RandomSource.SPLIT_MIX_64.create()::nextInt;
+        final DiscreteSampler s = RandomAssert.createRNG()::nextInt;
         Assertions.assertEquals(Long.MAX_VALUE, s.samples().spliterator().estimateSize());
     }
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
index 1a33921d..fe36b65c 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
@@ -23,7 +23,7 @@ import java.util.Collections;
 import org.apache.commons.math3.util.MathArrays;
 
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
+import org.apache.commons.rng.sampling.RandomAssert;
 
 /**
  * List of samplers.
@@ -48,26 +48,26 @@ public final class DiscreteSamplersList {
             final double probSuccessBinomial = 0.67;
             add(LIST, new org.apache.commons.math3.distribution.BinomialDistribution(unusedRng, trialsBinomial, probSuccessBinomial),
                 MathArrays.sequence(8, 9, 1),
-                RandomSource.KISS.create());
+                RandomAssert.createRNG());
             add(LIST, new org.apache.commons.math3.distribution.BinomialDistribution(unusedRng, trialsBinomial, probSuccessBinomial),
                 // range [9,16]
                 MathArrays.sequence(8, 9, 1),
-                MarsagliaTsangWangDiscreteSampler.Binomial.of(RandomSource.WELL_19937_A.create(), trialsBinomial, probSuccessBinomial));
+                MarsagliaTsangWangDiscreteSampler.Binomial.of(RandomAssert.createRNG(), trialsBinomial, probSuccessBinomial));
             // Inverted
             add(LIST, new org.apache.commons.math3.distribution.BinomialDistribution(unusedRng, trialsBinomial, 1 - probSuccessBinomial),
                 // range [4,11] = [20-16, 20-9]
                 MathArrays.sequence(8, 4, 1),
-                MarsagliaTsangWangDiscreteSampler.Binomial.of(RandomSource.WELL_19937_C.create(), trialsBinomial, 1 - probSuccessBinomial));
+                MarsagliaTsangWangDiscreteSampler.Binomial.of(RandomAssert.createRNG(), trialsBinomial, 1 - probSuccessBinomial));
 
             // Geometric ("inverse method").
             final double probSuccessGeometric = 0.21;
             add(LIST, new org.apache.commons.math3.distribution.GeometricDistribution(unusedRng, probSuccessGeometric),
                 MathArrays.sequence(10, 0, 1),
-                RandomSource.ISAAC.create());
+                RandomAssert.createRNG());
             // Geometric.
             add(LIST, new org.apache.commons.math3.distribution.GeometricDistribution(unusedRng, probSuccessGeometric),
                 MathArrays.sequence(10, 0, 1),
-                GeometricSampler.of(RandomSource.XOR_SHIFT_1024_S_PHI.create(), probSuccessGeometric));
+                GeometricSampler.of(RandomAssert.createRNG(), probSuccessGeometric));
 
             // Hypergeometric ("inverse method").
             final int popSizeHyper = 34;
@@ -75,57 +75,57 @@ public final class DiscreteSamplersList {
             final int sampleSizeHyper = 12;
             add(LIST, new org.apache.commons.math3.distribution.HypergeometricDistribution(unusedRng, popSizeHyper, numSuccessesHyper, sampleSizeHyper),
                 MathArrays.sequence(10, 0, 1),
-                RandomSource.MT.create());
+                RandomAssert.createRNG());
 
             // Pascal ("inverse method").
             final int numSuccessesPascal = 6;
             final double probSuccessPascal = 0.2;
             add(LIST, new org.apache.commons.math3.distribution.PascalDistribution(unusedRng, numSuccessesPascal, probSuccessPascal),
                 MathArrays.sequence(18, 1, 1),
-                RandomSource.TWO_CMRES.create());
+                RandomAssert.createRNG());
 
             // Uniform ("inverse method").
             final int loUniform = -3;
             final int hiUniform = 4;
             add(LIST, new org.apache.commons.math3.distribution.UniformIntegerDistribution(unusedRng, loUniform, hiUniform),
                 MathArrays.sequence(8, -3, 1),
-                RandomSource.SPLIT_MIX_64.create());
+                RandomAssert.createRNG());
             // Uniform (power of 2 range).
             add(LIST, new org.apache.commons.math3.distribution.UniformIntegerDistribution(unusedRng, loUniform, hiUniform),
                 MathArrays.sequence(8, -3, 1),
-                DiscreteUniformSampler.of(RandomSource.MT_64.create(), loUniform, hiUniform));
+                DiscreteUniformSampler.of(RandomAssert.createRNG(), loUniform, hiUniform));
             // Uniform (large range).
             final int halfMax = Integer.MAX_VALUE / 2;
             final int hiLargeUniform = halfMax + 10;
             final int loLargeUniform = -hiLargeUniform;
             add(LIST, new org.apache.commons.math3.distribution.UniformIntegerDistribution(unusedRng, loLargeUniform, hiLargeUniform),
                 MathArrays.sequence(20, -halfMax, halfMax / 10),
-                DiscreteUniformSampler.of(RandomSource.WELL_1024_A.create(), loLargeUniform, hiLargeUniform));
+                DiscreteUniformSampler.of(RandomAssert.createRNG(), loLargeUniform, hiLargeUniform));
             // Uniform (non-power of 2 range).
             final int rangeNonPowerOf2Uniform = 11;
             final int hiNonPowerOf2Uniform = loUniform + rangeNonPowerOf2Uniform;
             add(LIST, new org.apache.commons.math3.distribution.UniformIntegerDistribution(unusedRng, loUniform, hiNonPowerOf2Uniform),
                 MathArrays.sequence(rangeNonPowerOf2Uniform, -3, 1),
-                DiscreteUniformSampler.of(RandomSource.XO_SHI_RO_256_SS.create(), loUniform, hiNonPowerOf2Uniform));
+                DiscreteUniformSampler.of(RandomAssert.createRNG(), loUniform, hiNonPowerOf2Uniform));
 
             // Zipf ("inverse method").
             final int numElementsZipf = 5;
             final double exponentZipf = 2.345;
             add(LIST, new org.apache.commons.math3.distribution.ZipfDistribution(unusedRng, numElementsZipf, exponentZipf),
                 MathArrays.sequence(5, 1, 1),
-                RandomSource.XOR_SHIFT_1024_S_PHI.create());
+                RandomAssert.createRNG());
             // Zipf.
             add(LIST, new org.apache.commons.math3.distribution.ZipfDistribution(unusedRng, numElementsZipf, exponentZipf),
                 MathArrays.sequence(5, 1, 1),
-                RejectionInversionZipfSampler.of(RandomSource.WELL_19937_C.create(), numElementsZipf, exponentZipf));
+                RejectionInversionZipfSampler.of(RandomAssert.createRNG(), numElementsZipf, exponentZipf));
             // Zipf (exponent close to 1).
             final double exponentCloseToOneZipf = 1 - 1e-10;
             add(LIST, new org.apache.commons.math3.distribution.ZipfDistribution(unusedRng, numElementsZipf, exponentCloseToOneZipf),
                 MathArrays.sequence(5, 1, 1),
-                RejectionInversionZipfSampler.of(RandomSource.WELL_19937_C.create(), numElementsZipf, exponentCloseToOneZipf));
+                RejectionInversionZipfSampler.of(RandomAssert.createRNG(), numElementsZipf, exponentCloseToOneZipf));
             // Zipf (exponent = 0).
             add(LIST, MathArrays.sequence(5, 1, 1), new double[] {0.2, 0.2, 0.2, 0.2, 0.2},
-                RejectionInversionZipfSampler.of(RandomSource.XO_RO_SHI_RO_128_PP.create(), numElementsZipf, 0.0));
+                RejectionInversionZipfSampler.of(RandomAssert.createRNG(), numElementsZipf, 0.0));
 
             // Poisson ("inverse method").
             final double epsilonPoisson = org.apache.commons.math3.distribution.PoissonDistribution.DEFAULT_EPSILON;
@@ -133,65 +133,65 @@ public final class DiscreteSamplersList {
             final double meanPoisson = 3.21;
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                RandomSource.MWC_256.create());
+                RandomAssert.createRNG());
             // Poisson.
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                PoissonSampler.of(RandomSource.KISS.create(), meanPoisson));
+                PoissonSampler.of(RandomAssert.createRNG(), meanPoisson));
             // Dedicated small mean poisson samplers
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                SmallMeanPoissonSampler.of(RandomSource.XO_SHI_RO_256_PLUS.create(), meanPoisson));
+                SmallMeanPoissonSampler.of(RandomAssert.createRNG(), meanPoisson));
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                KempSmallMeanPoissonSampler.of(RandomSource.XO_SHI_RO_128_PLUS.create(), meanPoisson));
+                KempSmallMeanPoissonSampler.of(RandomAssert.createRNG(), meanPoisson));
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomSource.XO_SHI_RO_128_PLUS.create(), meanPoisson));
+                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomAssert.createRNG(), meanPoisson));
             // LargeMeanPoissonSampler should work at small mean.
             // Note: This hits a code path where the sample from the normal distribution is rejected.
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, meanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(10, 0, 1),
-                LargeMeanPoissonSampler.of(RandomSource.PCG_MCG_XSH_RR_32.create(), meanPoisson));
+                LargeMeanPoissonSampler.of(RandomAssert.createRNG(), meanPoisson));
             // Poisson (40 < mean < 80).
             final double largeMeanPoisson = 67.89;
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, largeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(50, (int) (largeMeanPoisson - 25), 1),
-                PoissonSampler.of(RandomSource.SPLIT_MIX_64.create(), largeMeanPoisson));
+                PoissonSampler.of(RandomAssert.createRNG(), largeMeanPoisson));
             // Dedicated large mean poisson sampler
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, largeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(50, (int) (largeMeanPoisson - 25), 1),
-                LargeMeanPoissonSampler.of(RandomSource.SPLIT_MIX_64.create(), largeMeanPoisson));
+                LargeMeanPoissonSampler.of(RandomAssert.createRNG(), largeMeanPoisson));
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, largeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(50, (int) (largeMeanPoisson - 25), 1),
-                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomSource.XO_RO_SHI_RO_128_PLUS.create(), largeMeanPoisson));
+                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomAssert.createRNG(), largeMeanPoisson));
             // Poisson (mean >> 40).
             final double veryLargeMeanPoisson = 543.21;
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, veryLargeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), 1),
-                PoissonSampler.of(RandomSource.SPLIT_MIX_64.create(), veryLargeMeanPoisson));
+                PoissonSampler.of(RandomAssert.createRNG(), veryLargeMeanPoisson));
             // Dedicated large mean poisson sampler
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, veryLargeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), 1),
-                LargeMeanPoissonSampler.of(RandomSource.SPLIT_MIX_64.create(), veryLargeMeanPoisson));
+                LargeMeanPoissonSampler.of(RandomAssert.createRNG(), veryLargeMeanPoisson));
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(unusedRng, veryLargeMeanPoisson, epsilonPoisson, maxIterationsPoisson),
                 MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), 1),
-                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomSource.XO_RO_SHI_RO_64_SS.create(), veryLargeMeanPoisson));
+                MarsagliaTsangWangDiscreteSampler.Poisson.of(RandomAssert.createRNG(), veryLargeMeanPoisson));
 
             // Any discrete distribution
             final int[] discretePoints = {0, 1, 2, 3, 4};
             final double[] discreteProbabilities = {0.1, 0.2, 0.3, 0.4, 0.5};
             final long[] discreteFrequencies = {1, 2, 3, 4, 5};
             add(LIST, discretePoints, discreteProbabilities,
-                MarsagliaTsangWangDiscreteSampler.Enumerated.of(RandomSource.XO_SHI_RO_512_PLUS.create(), discreteProbabilities));
+                MarsagliaTsangWangDiscreteSampler.Enumerated.of(RandomAssert.createRNG(), discreteProbabilities));
             add(LIST, discretePoints, discreteProbabilities,
-                GuideTableDiscreteSampler.of(RandomSource.XO_SHI_RO_512_SS.create(), discreteProbabilities));
+                GuideTableDiscreteSampler.of(RandomAssert.createRNG(), discreteProbabilities));
             add(LIST, discretePoints, discreteProbabilities,
-                AliasMethodDiscreteSampler.of(RandomSource.KISS.create(), discreteProbabilities));
+                AliasMethodDiscreteSampler.of(RandomAssert.createRNG(), discreteProbabilities));
             add(LIST, discretePoints, discreteProbabilities,
-                FastLoadedDiceRollerDiscreteSampler.of(RandomSource.L64_X128_MIX.create(), discreteFrequencies));
+                FastLoadedDiceRollerDiscreteSampler.of(RandomAssert.createRNG(), discreteFrequencies));
             add(LIST, discretePoints, discreteProbabilities,
-                FastLoadedDiceRollerDiscreteSampler.of(RandomSource.L64_X128_SS.create(), discreteProbabilities));
+                FastLoadedDiceRollerDiscreteSampler.of(RandomAssert.createRNG(), discreteProbabilities));
         } catch (Exception e) {
             // CHECKSTYLE: stop Regexp
             System.err.println("Unexpected exception while creating the list of samplers: " + e);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
index 0665f4da..69eefccf 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
@@ -46,7 +46,7 @@ class DiscreteUniformSamplerTest {
     void testSamplesWithRangeOf1() {
         final int upper = 99;
         final int lower = upper;
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final SharedStateDiscreteSampler sampler = DiscreteUniformSampler.of(rng, lower, upper);
         for (int i = 0; i < 5; i++) {
             Assertions.assertEquals(lower, sampler.sample());
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
index 2ccf43c4..b130f565 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/FastLoadedDiceRollerDiscreteSamplerTest.java
@@ -42,7 +42,7 @@ class FastLoadedDiceRollerDiscreteSamplerTest {
      * @return the FLDR sampler
      */
     private static SharedStateDiscreteSampler createSampler(long... frequencies) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         return FastLoadedDiceRollerDiscreteSampler.of(rng, frequencies);
     }
 
@@ -53,7 +53,7 @@ class FastLoadedDiceRollerDiscreteSamplerTest {
      * @return the FLDR sampler
      */
     private static SharedStateDiscreteSampler createSampler(double... weights) {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         return FastLoadedDiceRollerDiscreteSampler.of(rng, weights);
     }
 
@@ -403,7 +403,7 @@ class FastLoadedDiceRollerDiscreteSamplerTest {
     @ValueSource(ints = {1023, 67, 1, -59, -1020, -1021})
     void testScaledWeights(int scaleFactor) {
         // Weights in [0, 1)
-        final double[] w1 = RandomSource.KISS.create().doubles(10).toArray();
+        final double[] w1 = RandomAssert.createRNG().doubles(10).toArray();
         final double scale = Math.scalb(1.0, scaleFactor);
         final double[] w2 = Arrays.stream(w1).map(x -> x * scale).toArray();
         final long seed = RandomSource.createLong();
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
index 0f518367..0b97d710 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GuideTableDiscreteSamplerTest.java
@@ -90,7 +90,7 @@ class GuideTableDiscreteSamplerTest {
 
     @Test
     void testToString() {
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final SharedStateDiscreteSampler sampler = GuideTableDiscreteSampler.of(rng, new double[] {0.5, 0.5}, 1.0);
         Assertions.assertTrue(sampler.toString().toLowerCase().contains("guide table"));
     }
@@ -187,7 +187,7 @@ class GuideTableDiscreteSamplerTest {
      * @param alpha the alpha
      */
     private static void checkSamples(double[] probabilies, double alpha) {
-        final UniformRandomProvider rng = RandomSource.JSF_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final SharedStateDiscreteSampler sampler = GuideTableDiscreteSampler.of(rng, probabilies, alpha);
 
         final int numberOfSamples = 10000;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LongSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LongSamplerTest.java
index 26ca85e5..34792d56 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LongSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LongSamplerTest.java
@@ -17,6 +17,7 @@
 package org.apache.commons.rng.sampling.distribution;
 
 import java.util.concurrent.ThreadLocalRandom;
+import org.apache.commons.rng.sampling.RandomAssert;
 import org.apache.commons.rng.simple.RandomSource;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.RepeatedTest;
@@ -30,7 +31,7 @@ import org.junit.jupiter.params.provider.ValueSource;
 class LongSamplerTest {
     @Test
     void testSamplesUnlimitedSize() {
-        final LongSampler s = RandomSource.SPLIT_MIX_64.create()::nextLong;
+        final LongSampler s = RandomAssert.createRNG()::nextLong;
         Assertions.assertEquals(Long.MAX_VALUE, s.samples().spliterator().estimateSize());
     }
 
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
index e839fb14..79eda8bf 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
@@ -183,7 +183,7 @@ class MarsagliaTsangWangDiscreteSamplerTest {
     void testRealProbabilityDistributionSamples() {
         // These do not have to sum to 1
         final double[] probabilities = new double[11];
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         for (int i = 0; i < probabilities.length; i++) {
             probabilities[i] = rng.nextDouble();
         }
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
index 4f4f06d0..df4f584f 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/StableSamplerTest.java
@@ -538,7 +538,7 @@ class StableSamplerTest {
         // As pi is an approximation then the cos value is not exactly 0
         Assertions.assertTrue(cosPi2 > 0);
 
-        final UniformRandomProvider rng = RandomSource.XO_SHI_RO_256_SS.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
 
         // The term is mirrored around 1 so use extremes between 1 and 0
         final double[] alphas = {1, Math.nextDown(1), 0.99, 0.5, 0.1, 0.05, 0.01, DU};
@@ -690,7 +690,7 @@ class StableSamplerTest {
     //@Test
     void expm1ULPReport() {
         // Create random doubles with a given exponent. Compute the mean and max ULP difference.
-        final UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         // For a quicker report set to <= 2^20.
         final int size = 1 << 30;
         // Create random doubles using random bits in the 52-bit mantissa.
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
index 802a018e..2b46fa0d 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/UniformLongSamplerTest.java
@@ -56,7 +56,7 @@ class UniformLongSamplerTest {
     void testSamplesWithRangeOf1() {
         final long upper = 99;
         final long lower = upper;
-        final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final UniformLongSampler sampler = UniformLongSampler.of(rng, lower, upper);
         for (int i = 0; i < 5; i++) {
             Assertions.assertEquals(lower, sampler.sample());
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
index 9f22507d..d60b5092 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/shape/TriangleSamplerTest.java
@@ -82,7 +82,7 @@ class TriangleSamplerTest {
         // Test that a(1 - s - t) + sb + tc does not overflow is s+t = 1
         final double max = Double.MAX_VALUE;
         s -= delta;
-        final UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         for (int n = 0; n < 100; n++) {
             Assertions.assertNotEquals(Double.POSITIVE_INFINITY, (1 - s - t) * max + s * max + t * max);
             s = rng.nextDouble();