RngUtils { public static long randomLong() { return seededRandom.nextLong(); }  static String randomString(int length); static String randomString(Random rng, int length); static long randomLong(); static long randomPositiveLong(); static long randomPositiveLong(Random rng); static long randomPositiveLong(long keyMin, long keyMax); static long randomPositiveLong(Random rng, long keyMin, long keyMax); static short randomPositiveShort(); static short randomPositiveShort(Random rng); static DbusEvent randomEvent(short srcId); static int randomPositiveInt(); static int randomPositiveInt(Random rng); static long randomGaussianLong(long min, long max, Random rng); static final String Letters; static final String Digits; static final String LettersAndDigits; static final Random seededRandom; static final Random random; static final DbusEventFactory _eventFactory; static final byte[] schemaMd5; }
@Test public void testRandomLong() { for (int j=0; j < Integer.MAX_VALUE/100; ++j) { long l = RngUtils.randomPositiveLong(); if (l < 0) { Assert.fail("long < 0: " + l); } } }