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());
    }
@SuppressWarnings("unchecked")
    @Test
    void empty_table_cells_are_presented_as_null_to_transformer() {
        registry.setDefaultDataTableEntryTransformer(
            (map, valueType, tableCellByTypeTransformer) -> objectMapper.convertValue(map,
                objectMapper.constructType(valueType)));

        StepDefinition stepDefinition = new StubStepDefinition("Given some stuff:", getTypeFromStepDefinition());
        StepExpression expression = stepExpressionFactory.createExpression(stepDefinition);
        List<List<String>> table = asList(asList("name", "amount", "unit"), asList("chocolate", null, "tbsp"));
        List<Argument> match = expression.match("Given some stuff:", table);

        List<Ingredient> ingredients = (List<Ingredient>) match.get(0).getValue();
        Ingredient ingredient = ingredients.get(0);
        assertThat(ingredient.name, is(equalTo("chocolate")));

    }