@Test
public void testRandom() {

    LOG.info("testRandom");
    MathUtils.setRandomSeed(12121212);
    final int min = 10;
    final int max = 20;
    Assert.assertEquals(11, MathUtils.random(min, max));
    Assert.assertEquals(16, MathUtils.random(min, max));
    for (int i = 0; i < 1000; ++i) {
        final int r = MathUtils.random(min, max);
        Assert.assertTrue((min <= r) && (r <= max));
    }
    final double[] b1 = {-1, 2, 3};
    final double[] b2 = {3, -1, 2};
    final double[] b3 = {2, 3, -1};
    Assert.assertTrue("Max should be 3", Double.compare(MathUtils.findMax(b1), 3.0) == 0);
    Assert.assertTrue("Max should be 3", Double.compare(MathUtils.findMax(b2), 3.0) == 0);
    Assert.assertTrue("Max should be 3", Double.compare(MathUtils.findMax(b3), 3.0) == 0);
}