title: how use optional parameters in cucumber
body: <p>I want the same Gherkin sentence (with paramaters and without paramaters):</p>
  
  <p><strong>Gherkin with paramaters:</strong></p>
  
  <pre><code>When a 'notify' message is sent to the green box with the properties.
   |type|message|
   |error|The error message|
  </code></pre>
  
  <p><strong>Gherkin without paramaters:</strong></p>
  
  <pre><code>When a 'notify' message is sent to the green box with the properties.
  </code></pre>
  
  <p><strong>Java (cucumber):</strong></p>
  
  <pre><code>@When("^a '(.*)' message is sent to the green box with the properties.$")
  public void hello(String name, List&lt;GherkinCondition&gt; conditions) {
      ...
  }
  </code></pre>
  
  <p>I have a error because java method is is declared with 2 parameters and in the case "without paramaters" I have only one.</p>
  
  <p><strong>stack trace:</strong></p>
  
  <pre><code>cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'steps.CommonSteps.hello(String,GherkinCondition&gt;) in file:/C:/workspace/xxxxx/java/target/classes/' with pattern [^a '(.*)' message is sent to the green box with the properties.$] is declared with 2 parameters. However, the gherkin step has 1 arguments [notify]. 
  </code></pre>