ParameterConverter converter = new NumberListConverter();
Type listOfNumbers = SomeSteps.methodFor("aMethodWithListOfNumbers").getGenericParameterTypes()[0];
Type setOfNumbers = SomeSteps.methodFor("aMethodWithSetOfNumbers").getGenericParameterTypes()[0];
assertThat(converter.accept(listOfNumbers), is(true));
assertThat(converter.accept(setOfNumbers), is(false));
List<Number> list = (List<Number>) converter.convertValue("3, 0.5, 6.1f, 8.00", listOfNumbers);
NumberFormat numberFormat = NumberFormat.getInstance(ParameterConverters.DEFAULT_NUMBER_FORMAT_LOCAL);
assertThat(list.get(0), equalTo(numberFormat.parse("3")));
assertThat(list.get(1), equalTo(numberFormat.parse("0.5")));
assertThat(list.get(2), equalTo(numberFormat.parse("6.1f")));
assertThat(list.get(3), equalTo(numberFormat.parse("8.00")));