### Question:
IndexBasedModelConverter implements ModelConverter { @Override public int[] convertCombination(Combination combination) { Preconditions.notNull(combination); int[] combinationArray = CombinationUtil.emptyCombination(model.size()); for (Map.Entry<Parameter, Value> mapping : combination.getParameterValueMap().entrySet()) { final int parameterId = parameterToIdMap.getInt(mapping.getKey()); final int valueId = parameterValueToIdMap.get(mapping.getKey()).getInt(mapping.getValue()); combinationArray[parameterId] = valueId; } return combinationArray; } IndexBasedModelConverter(InputParameterModel model);  IndexBasedModelConverter(InputParameterModel model,
                                    IndexBasedConstraintConverter constraintsConverter); @Override InputParameterModel getModel(); @Override TestModel getConvertedModel(); @Override int[] convertCombination(Combination combination); @Override Combination convertCombination(int[] combination); @Override int convertParameter(Parameter parameter); @Override Parameter convertParameter(int parameter); @Override int convertValue(Parameter parameter, Value value); @Override Value convertValue(int parameter, int value); @Override TupleList convertConstraint(Constraint constraint); @Override Constraint convertConstraint(TupleList constraint);  }### Answer:
@Test void combinationConversion() { final InputParameterModel model = InputParameterModel.inputParameterModel("name").strength(2).parameters(Parameter.parameter("param1").values(0, 1), Parameter.parameter("param2").values("one", "two", "three"), Parameter.parameter("param3").values(1.1, 2.2, 3.3, 4.4)).build(); final ModelConverter converter = new IndexBasedModelConverter(model); int[] combination = new int[]{NO_VALUE, NO_VALUE, NO_VALUE}; Combination convertedCombination = converter.convertCombination(combination); assertEquals(0, convertedCombination.size()); assertEquals(Collections.emptyMap(), convertedCombination.getParameterValueMap()); assertArrayEquals(combination, converter.convertCombination(convertedCombination)); combination = new int[]{NO_VALUE, 1, NO_VALUE}; convertedCombination = converter.convertCombination(combination); assertEquals(1, convertedCombination.size()); Assertions.assertEquals(Value.value(1, "two"), convertedCombination.getValue(model.getParameters().get(1))); assertArrayEquals(combination, converter.convertCombination(convertedCombination)); }