MySQLRandomGenerator { public byte[] generateRandomBytes(final int length) { byte[] result = new byte[length]; for (int i = 0; i < length; i++) { result[i] = SEED[random.nextInt(SEED.length)]; } return result; }  byte[] generateRandomBytes(final int length);  }
@Test public void assertGenerateRandomBytes() { assertThat(MySQLRandomGenerator.getINSTANCE().generateRandomBytes(8).length, is(8)); assertThat(MySQLRandomGenerator.getINSTANCE().generateRandomBytes(12).length, is(12)); }