@Override
  synchronized public void close() {
    if (stream != null) {
      IOUtils.cleanupWithLogger(LOG, stream);
      stream = null;
    }
  }
@Test(timeout=120000)
  public void testRandomBytes() throws Exception {
    OsSecureRandom random = getOsSecureRandom();
    // len = 16
    checkRandomBytes(random, 16);
    // len = 32
    checkRandomBytes(random, 32);
    // len = 128
    checkRandomBytes(random, 128);
    // len = 256
    checkRandomBytes(random, 256);
    random.close();
  }