Fixed failing unit test.

Source of failure was MATH-1340: Expected exception is now wrapped in another exception.
This commit is contained in:
Gilles 2016-04-22 03:01:33 +02:00
parent baae2a6f3e
commit 84143c4629
1 changed files with 7 additions and 2 deletions

View File

@ -80,9 +80,14 @@ public class JDKRandomAdaptorTest {
Assert.assertEquals(withoutReseed, withReseed, 0);
}
@Test(expected=MathUnsupportedOperationException.class)
@Test
public void testSerializeIsNotSupported() {
TestUtils.serializeAndRecover(new JDKRandomAdaptor(RandomSource.create(RandomSource.WELL_512_A)));
try {
TestUtils.serializeAndRecover(new JDKRandomAdaptor(RandomSource.create(RandomSource.WELL_512_A)));
} catch (Exception e) {
Throwable cause = e.getCause();
Assert.assertTrue(cause instanceof MathUnsupportedOperationException);
}
}
/**