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 table_expression_with_type_creates_table_from_table() {

        StepDefinition stepDefinition = new StubStepDefinition("Given some stuff:", DataTable.class);
        StepExpression expression = stepExpressionFactory.createExpression(stepDefinition);

        List<Argument> match = expression.match("Given some stuff:", table);

        DataTable dataTable = (DataTable) match.get(0).getValue();
        assertThat(dataTable.cells(), is(equalTo(table)));
    }