@Test
public void testNextBytesEqualSeed() {

  Random rand = new Random(42);
  final byte[] seed = new byte[32];
  rand.nextBytes(seed);
  AesCtrDrbg drbg1 = new AesCtrDrbg(seed);
  AesCtrDrbg drbg2 = new AesCtrDrbg(seed);
  final int arraySize = 1500;
  byte[] bytes1 = new byte[arraySize];
  byte[] bytes2 = new byte[arraySize];
  drbg1.nextBytes(bytes1);
  drbg2.nextBytes(bytes2);
  assertArrayEquals(bytes1, bytes2); // Bytes should be equal when seed is equal
  assertFalse(Arrays.equals(bytes1, new byte[arraySize])); // The zero-array is very unlikely
  drbg1.nextBytes(bytes1);
  assertFalse(Arrays.equals(bytes1, bytes2)); // Each call gives new bytes
  drbg2.nextBytes(bytes2);
  assertArrayEquals(bytes1, bytes2); // The arays should now be back in sync
  assertFalse(Arrays.equals(bytes1, new byte[arraySize])); // Still the zero-array is unlikely
}