@@ -0,0 +1,1154 @@
+package cucumber.runtime.java;%0A%0Aimport java.util.regex.Pattern;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport cucumber.api.java8.StepdefBody;%0A%0Apublic class Java8StepDefinitionTest %7B%0A%0A    private Java8StepDefinition java8StepDefinition;%0A%0A    @Test%0A    public void should_calculate_parameters_count_by_using_only_step_method_parameters_definition() throws Exception %7B%0A        java8StepDefinition = new Java8StepDefinition(Pattern.compile(%22%5EI have (%5C%5Cd) some step (.*)$%22), 0, oneParamStep(), null);%0A        Assert.assertEquals(new Integer(1), java8StepDefinition.getParameterCount());%0A%0A        java8StepDefinition = new Java8StepDefinition(Pattern.compile(%22%5EI have some step $%22), 0, twoParamStep(), null);%0A        Assert.assertEquals(new Integer(2), java8StepDefinition.getParameterCount());%0A    %7D%0A%0A    private StepdefBody oneParamStep() %7B%0A        return new StepdefBody.A1%3CString%3E() %7B%0A            public void accept(String p1) %7B%0A            %7D%0A        %7D;%0A    %7D%0A%0A    private StepdefBody twoParamStep() %7B%0A        return new StepdefBody.A2%3CString, String%3E() %7B%0A            public void accept(String p1, String p2) %7B%0A            %7D%0A        %7D;%0A    %7D%0A%0A%7D%0A

Update Java8StepDefinition.java