ParameterSetGenerator { public List<Double[]> generate() { Double[] nextPnt = new Double[sizeOfParamVector]; traverseTree(map, nextPnt, -1); return Collections.unmodifiableList(params); } ParameterSetGenerator(Map<Integer, Double[]> map); List<Double[]> generate();  }
@Test public void testParamSetGenerator() { Map<Integer, Double[]> map = new TreeMap<>(); map.put(0, new Double[]{1.1, 2.1}); map.put(1, new Double[]{1.2, 2.2, 3.2, 4.2}); map.put(2, new Double[]{1.3, 2.3}); map.put(3, new Double[]{1.4}); List<Double[]> res = new ParameterSetGenerator(map).generate(); assertEquals(res.size(), 16); }
@Test(expected = java.lang.AssertionError.class) public void testParamSetGeneratorWithEmptyMap() { Map<Integer, Double[]> map = new TreeMap<>(); new ParameterSetGenerator(map).generate(); }
@Test(expected = java.lang.AssertionError.class) public void testNullHandling() { new ParameterSetGenerator(null).generate(); }