ParameterSpace implements Iterable<Map<String, Object>> { public int getStepCount() { return stepCount; } ParameterSpace();  ParameterSpace(Dimension<?>... aDimensions); void reset(); void setDimensions(Dimension<?>[] aDimensions); Dimension<?>[] getDimensions(); int getStepCount(); void addConstraint(Constraint aConstraint); void removeConstraint(Constraint aConstraint); void setConstraints(Set<Constraint> aConstraints); Set<Constraint> getConstraints(); @Override Iterator<Map<String, Object>> iterator();  }
@Test public void test() { Dimension<String> letters = Dimension.create("letters", "a", "b", "c"); Dimension<Integer> numbers = Dimension.create("numbers", 1, 2); Dimension<Character> symbols = Dimension.create("symbols", '!', '&'); int n = 0; ParameterSpace pSpace = new ParameterSpace(letters, numbers, symbols); for (@SuppressWarnings("unused") Map<String, Object> config : pSpace) { n++; } assertEquals(3 * 2 * 2, n); assertEquals((3 * 2 * 2), pSpace.getStepCount()); }
@Test public void testZeroSizeDimension() { Dimension<String> letters = Dimension.create("letters", "a", "b", "c"); Dimension<Integer> numbers = Dimension.create("numbers"); int n = 0; ParameterSpace pSpace = new ParameterSpace(letters, numbers); for (@SuppressWarnings("unused") Map<String, Object> config : pSpace) { n++; } assertEquals(3 , n); assertEquals(3, pSpace.getStepCount()); }