@@ -53,7 +53,6 @@ void testSingleTrialConsistency() {
53
53
@ Test
54
54
void testJacobiSymbolBasicCases () throws Exception {
55
55
var method = EulerPseudoprime .class .getDeclaredMethod ("jacobiSymbol" , BigInteger .class , BigInteger .class );
56
- method .setAccessible (true );
57
56
58
57
// (a/n) = (2/3) = -1
59
58
assertEquals (-1 , (int ) method .invoke (null , BigInteger .valueOf (2 ), BigInteger .valueOf (3 )));
@@ -68,18 +67,6 @@ void testJacobiSymbolBasicCases() throws Exception {
68
67
assertEquals (0 , (int ) method .invoke (null , BigInteger .valueOf (3 ), BigInteger .valueOf (9 )));
69
68
}
70
69
71
- @ Test
72
- void testUniformRandomRange () throws Exception {
73
- var method = EulerPseudoprime .class .getDeclaredMethod ("uniformRandom" , BigInteger .class , BigInteger .class );
74
- method .setAccessible (true );
75
-
76
- BigInteger min = BigInteger .TWO ;
77
- BigInteger max = BigInteger .valueOf (20 );
78
- BigInteger value = (BigInteger ) method .invoke (null , min , max );
79
-
80
- assertTrue (value .compareTo (min ) >= 0 && value .compareTo (max ) <= 0 , "Random value should be within [min, max]" );
81
- }
82
-
83
70
@ Test
84
71
void testIsProbablePrimeWhenJacobiSymbolIsZero () {
85
72
try (MockedStatic <EulerPseudoprime > mockedPrimality = Mockito .mockStatic (EulerPseudoprime .class , Mockito .CALLS_REAL_METHODS )) {
@@ -96,7 +83,6 @@ void testIsProbablePrimeWhenJacobiSymbolIsZero() {
96
83
@ Test
97
84
void testJacobiSymbolThrowsForEvenOrNonPositiveN () throws Exception {
98
85
var method = EulerPseudoprime .class .getDeclaredMethod ("jacobiSymbol" , BigInteger .class , BigInteger .class );
99
- method .setAccessible (true );
100
86
101
87
// Helper lambda to unwrap InvocationTargetException
102
88
Runnable invokeJacobi = () -> {
0 commit comments