CombinationSet { public int nbOfCombinationsAbove(int k) { int nb = 0; for (int i = set.size(); i >= k; i--) nb += nbOfCombinations(i); return nb; } CombinationSet(Set<? extends Object> set); int nbOfCombinations(int k); int nbOfCombinationsAbove(int k); List<Combination> getAllCombinationsOfNElements(int n); List<Combination> getAllCombinationsOfNOrMoreElements(int n); List<Combination> getAllCombinations(); long getTotalNb();  }
@Test public void testNbOfCombinationsAbove() { HashSet<Integer> set = new HashSet<Integer>(); set.add(1); set.add(2); set.add(3); CombinationSet combiSet = new CombinationSet(set); Assert.assertTrue(combiSet.nbOfCombinationsAbove(2) == 4); }