@Test
public void testNextTwinPrime() {

  assertEquals(5, RandomUtils.nextTwinPrime(-1));
  assertEquals(5, RandomUtils.nextTwinPrime(1));
  assertEquals(5, RandomUtils.nextTwinPrime(2));
  assertEquals(5, RandomUtils.nextTwinPrime(3));
  assertEquals(7, RandomUtils.nextTwinPrime(4));
  assertEquals(7, RandomUtils.nextTwinPrime(5));
  assertEquals(13, RandomUtils.nextTwinPrime(6));
  assertEquals(RandomUtils.MAX_INT_SMALLER_TWIN_PRIME + 2,
               RandomUtils.nextTwinPrime(RandomUtils.MAX_INT_SMALLER_TWIN_PRIME));
  try {
    RandomUtils.nextTwinPrime(RandomUtils.MAX_INT_SMALLER_TWIN_PRIME + 1);
    fail();
  } catch (IllegalArgumentException iae) {
    // good
  }
}