public void shouldConvertMultilineTableToParameters() throws ParseException, IntrospectionException {
ParameterConverter converter = new ExamplesTableParametersConverter();
Type type = SomeSteps.methodFor("aMethodWithExamplesTableParameters").getGenericParameterTypes()[0];
assertThat(converter.accept(type), is(true));
assertThat(converter.accept(WrongType.class), is(false));
assertThat(converter.accept(mock(Type.class)), is(false));
String value = "|col1|col2|\n|row11|row12|\n|row21|row22|\n";
@SuppressWarnings("unchecked")
List<MyParameters> parameters = (List<MyParameters>) converter.convertValue(value, type);
assertThat(parameters.size(), equalTo(2));
MyParameters row1 = parameters.get(0);