converter.convertValue(date, type);
}
@Test
public void shouldConvertMultilineTable() throws ParseException, IntrospectionException {
ParameterConverter converter = new ExamplesTableConverter();
assertThat(converter.accept(ExamplesTable.class), is(true));
assertThat(converter.accept(WrongType.class), is(false));
assertThat(converter.accept(mock(Type.class)), is(false));
Type type = SomeSteps.methodFor("aMethodWithExamplesTable").getGenericParameterTypes()[0];
String value = "|col1|col2|\n|row11|row12|\n|row21|row22|\n";
ExamplesTable table = (ExamplesTable) converter.convertValue(value, type);
assertThat(table.getRowCount(), equalTo(2));
Map<String, String> row1 = table.getRow(0);
assertThat(row1.get("col1"), equalTo("row11"));
assertThat(row1.get("col2"), equalTo("row12"));
Map<String, String> row2 = table.getRow(1);