RdRandRandom extends Random { @Override public void nextBytes(byte[] bytes) { RdRandUtil.nextBytes(bytes); } RdRandRandom(); @Override void nextBytes(byte[] bytes); @Override synchronized void setSeed(long seed);  }
@Test public final void testNextBytes() { byte[] bytes = new byte[32]; Random random = new RdRandRandom(); random.nextBytes(bytes); byte[] emptyBytes = new byte[32]; assertFalse(Arrays.equals(bytes, emptyBytes)); }