I have the following piece of code :
int numberofTimesToRandomize = 10;
long seed = System.nanoTime();
Random r = new Random(seed);
List<List<Integer>> listOfRandoms = new ArrayList<List<Integer>>();
List<Integer> l = service.get();
for (int i = 0; i < numberofTimesToRandomize; i++) {
Collections.shuffle(l, r);
List<Integer> rnd = l.subList(1, 100);
listOfRandoms.add(rnd);
}
What I want to know is whether there is a way to determine the measure of randomness across the 10 lists each of size 100. The size of the list from which the random lists are picked is roughly 10000.
I have seen a couple of questions being answered with "no, there is no way". But those are for sequence of random numbers. A Good and SIMPLE Measure of Randomness
Any help would be appreciated.
EDIT : Based on Peter Lawreys question as to the purpose of this test, I thought one simple measure is to check if the resultant 10 lists are exactly the same independent of order. this question answers that for me : Simple way to find if two different lists contain exactly the same elements?
I wonder if this is the only way to unit test the above code.