### Question:
MathUtil { public static final <T> List<T> randomPickShuffle(Collection<T> collection, int count) { ArrayList<T> tList = new ArrayList<T>(); if (collection == null || collection.size() == 0 || count < 0 ) { return tList; } if (count >= collection.size()) { tList.addAll(collection); Collections.shuffle(tList); return tList; } Object[] array = randomData.nextSample(collection, count); for ( Object obj : array ) { tList.add((T)obj); } return tList; }  static final double nextDouble(); static final double nextGaussionDouble(); static final double nextGaussionDouble(double u, double q); static final int nextGaussionInt(int low, int high); static final int nextGaussionInt(int low, int high, double q); static final int nextGaussionInt2(int low, int high, double q); static final int nextFakeInt(int max); static final int[] nextPermuate(int n, int k); static final Object[] randomPick(Collection<T> collection,
			int count); static final List<T> randomPickShuffle(Collection<T> collection,
			int count); static final Collection<T> randomPickGaussion(
			Collection<T> collection, int count, double q); static final double solveCubicEquation(double a, double b, double c, double d);  }### Answer:
@Test public void testRandomPickShuffle() throws Exception { ArrayList list = new ArrayList(); int count = 10; for (int i = 0; i < count; i++) { List<RewardType> rewards = MathUtil.randomPickShuffle(RewardType.TYPES, 3); int index = 0; for ( RewardType reward: rewards ) { System.out.println("rewards["+(index++)+"] = " + reward); } } }
@Test public void testRandomPickShuffleMax() throws Exception { ArrayList list = new ArrayList(); int count = 10; for (int i = 0; i < count; i++) { List<RewardType> rewards = MathUtil.randomPickShuffle(RewardType.TYPES, RewardType.values().length+1); int index = 0; for ( RewardType reward: rewards ) { System.out.println("rewards["+i+"] = " + reward); } } }