public StepExpression createExpression(StepDefinition stepDefinition) {
        List<ParameterInfo> parameterInfos = stepDefinition.parameterInfos();

        if (parameterInfos.isEmpty()) {
            return createExpression(
                stepDefinition.getPattern(),
                stepDefinitionDoesNotTakeAnyParameter(stepDefinition),
                false);
        }

        ParameterInfo parameterInfo = parameterInfos.get(parameterInfos.size() - 1);
        return createExpression(
            stepDefinition.getPattern(),
            parameterInfo.getTypeResolver()::resolve,
            parameterInfo.isTransposed());
    }
@Test
    void docstring_and_datatable_match_same_step_definition() {
        String docString = "A rather long and boring string of documentation";
        StepDefinition stepDefinition = new StubStepDefinition("Given some stuff:", UNKNOWN_TYPE);
        StepExpression expression = stepExpressionFactory.createExpression(stepDefinition);
        List<Argument> match = expression.match("Given some stuff:", docString, null);
        assertThat(match.get(0).getValue(), is(equalTo(DocString.create(docString))));
        match = expression.match("Given some stuff:", table);
        assertThat(match.get(0).getValue(), is(equalTo(DataTable.create(table))));
    }