BAEL-1422: added BDD style test for asserting UnsupportedOperationException while setting seed for ThreadLocalRandom

This commit is contained in:
Tarang Bhalodia 2018-01-02 23:47:39 +05:30
parent 036fabc9f7
commit 12a1924cb3
1 changed files with 5 additions and 0 deletions

View File

@ -54,5 +54,10 @@ 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);
}
}