### Question:
PositionalParameterTypes extends ParameterTypes { @Override public List<Pair<ParameterTypes, ParameterConversions>> candidates() { Set<Pair<ParameterTypes, ParameterConversions>> result = new LinkedHashSet<>(); int n = types.size(); int m = ConversionKind.values().length; int[] conversionMap = init(n); conversionMap = next(conversionMap, n, m); while (conversionMap != null) { List<Type> newTypes = new ArrayList<>(); PositionalParameterConversions conversions = new PositionalParameterConversions(); boolean different = false; for (int i = 0; i < n; i++) { ConversionKind kind = ConversionKind.values()[conversionMap[i]]; Type type = types.get(i); Type newType = type; Conversion conversion = new Conversion(NONE, newType); if (kind == LIST_TO_ELEMENT) { if (type instanceof ListType) { newType = ((ListType) type).getElementType(); conversion = new Conversion(kind, newType); different = true; } } newTypes.add(newType); conversions.add(conversion); } if (different) { PositionalParameterTypes newSignature = new PositionalParameterTypes(newTypes); result.add(new Pair<>(newSignature, conversions)); } conversionMap = next(conversionMap, n, m); } return new ArrayList<>(result); } PositionalParameterTypes(List<Type> types); List<Type> getTypes(); @Override int size(); @Override boolean compatible(List<FormalParameter> parameters); @Override List<Pair<ParameterTypes, ParameterConversions>> candidates(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testCandidates() { ParameterTypes pt = getParameterTypes(); List<Pair<ParameterTypes, ParameterConversions>> candidates = pt.candidates(); assertEquals(0, candidates.size()); pt = new PositionalParameterTypes(Arrays.asList(ListType.NUMBER_LIST, StringType.STRING, ListType.STRING_LIST)); candidates = pt.candidates(); assertEquals(3, candidates.size()); Pair<ParameterTypes, ParameterConversions> candidate = candidates.get(0); assertEquals("Pair(PositionalParameterTypes(ListType(number), string, string), PositionalParameterConversions([Conversion(NONE, ListType(number)), Conversion(NONE, string), Conversion(LIST_TO_ELEMENT, string)]))", candidate.toString()); candidate = candidates.get(1); assertEquals("Pair(PositionalParameterTypes(number, string, ListType(string)), PositionalParameterConversions([Conversion(LIST_TO_ELEMENT, number), Conversion(NONE, string), Conversion(NONE, ListType(string))]))", candidate.toString()); candidate = candidates.get(2); assertEquals("Pair(PositionalParameterTypes(number, string, string), PositionalParameterConversions([Conversion(LIST_TO_ELEMENT, number), Conversion(NONE, string), Conversion(LIST_TO_ELEMENT, string)]))", candidate.toString()); }