added BDD style test for asserting UnsupportedOperationException while setting seed for ThreadLocalRandom
@@ -55,4 +55,9 @@ public class ThreadLocalRandomTest {
assertTrue(generatedInt < Double.MAX_VALUE && generatedInt >= Double.MIN_VALUE);
}
+ @Test(expected = UnsupportedOperationException.class)
+ public void givenUsingThreadLocalRandom_whenSettingSeed_thenThrowUnsupportedOperationException() {
+ ThreadLocalRandom.current().setSeed(0l);
+ }
+
}
\ No newline at end of file
