### Question:
ParameterizableStringFactory extends AbstractFeatureFactory<T> { @Override public List<T> permute(int maxSize) { Set<T> collector = new HashSet<>(); List<Float> currValues = new ArrayList<>(); recurse(0, maxSize, currValues, collector); return new ArrayList<>(collector); } ParameterizableStringFactory(String name, String factoryId, Class clazz, String paramString); String getFactoryId(); @Override T random(); @Override List<T> permute(int maxSize); @Override T mutate(T parameterizableString, double probability, double amplitude); @Override Pair<T, T> crossover(T parentA, T parentB);  }### Answer:
@Test public void testPermute() throws Exception { String paramString = "recip(rord(creationDate),[1,2,3],[10,100,1000],[$2],[1,5,10])"; ParameterizableStringFactory<TestParam> fact = new ParameterizableStringFactory("bf", "0", TestParam.class, paramString); List<TestParam> permuted = fact.permute(1000); assertEquals(27, permuted.size()); Set<TestParam> set = new HashSet<>(); set.addAll(permuted); assertEquals(27, set.size()); paramString = "recip(rord(creationDate),[1,2,3])"; fact = new ParameterizableStringFactory("bf", "0", TestParam.class, paramString); permuted = fact.permute(1000); assertEquals(3, permuted.size()); paramString = "recip(rord(creationDate),[1])"; fact = new ParameterizableStringFactory("bf", "0", TestParam.class, paramString); permuted = fact.permute(1000); assertEquals(1, permuted.size()); paramString = "recip(rord(creationDate))"; fact = new ParameterizableStringFactory("bf", "0", TestParam.class, paramString); permuted = fact.permute(1000); assertEquals(1, permuted.size()); }