public void shouldConvertCommaSeparatedValuesToListOfStrings() throws IntrospectionException {
ParameterConverter converter = new StringListConverter();
Type listOfStrings = SomeSteps.methodFor("aMethodWithListOfStrings").getGenericParameterTypes()[0];
Type listOfNumbers = SomeSteps.methodFor("aMethodWithListOfNumbers").getGenericParameterTypes()[0];
Type setOfNumbers = SomeSteps.methodFor("aMethodWithSetOfNumbers").getGenericParameterTypes()[0];
assertThat(converter.accept(listOfStrings), is(true));
assertThat(converter.accept(listOfNumbers), is(false));
assertThat(converter.accept(setOfNumbers), is(false));
ensureValueIsConvertedToList(converter, listOfStrings, "a, string ", Arrays.asList("a", "string"));
ensureValueIsConvertedToList(converter, listOfStrings, " ", Arrays.asList(new String[] {}));
}