### Question:
QRTone { public static int rand(AtomicLong next) { next.set(next.get() * 1103515245L + 12345L); return (int)(((next.get() / 65536) & 0xFFFF % 32768)); } QRTone(Configuration configuration); int getMaximumWindowLength(); long getPushedSamples(); Configuration getConfiguration(); double[] getFrequencies(); int setPayload(byte[] payload); byte[] getPayload(); int maxPayloadLength(Configuration.ECC_LEVEL eccLevel); int setPayload(byte[] payload, Configuration.ECC_LEVEL eccLevel, boolean addPayloadCRC); void getSamples(float[] samples, double power); static byte crc8(byte[] payload, int from, int to); static int crc16(byte[] payload, int from, int to); static void interleaveSymbols(byte[] inputData, int blockSize); static void deinterleaveSymbols(byte[] inputData, int blockSize); static int rand(AtomicLong next); static void applyHann(float[] signal, int from, int to, int windowLength, int offset); static void applyTukey(float[] signal,int from, int to, double alpha, int windowLength, int offset); static void generatePitch(float[] signal_out, int location, int length, final int offset, double sample_rate, double frequency, double powerPeak); void setTriggerCallback(TriggerAnalyzer.TriggerCallback triggerCallback); static double computeRms(float[] signal); boolean pushSamples(short[] samples); boolean pushSamples(float[] samples); void reset(); int getFixedErrors(); long gePayloadSampleIndex(); static final double M2PI; static final long PERMUTATION_SEED; static final double WINDOW_WIDTH; static final int CRC_BYTE_LENGTH; final static int NUM_FREQUENCIES; final static int FREQUENCY_ROOT; }### Answer:
@Test public void randTest() { int[] expected= new int[] {1199,22292,14258,30291,11005,15335,22572,27361,8276,27653}; AtomicLong seed = new AtomicLong(1337); for(int expectedValue : expected) { assertEquals(expectedValue, QRTone.rand(seed)); } }