 <p>Seems you are using BDD driven approch, but you didnt specified what process you are using either Jbehave or Cucumber. I am assuming that you are using Jbehave. In Jbehave You can use @Alias Annotation like this </p> <pre><code>@When("a stock of symbol $symbol and a threshold of $threshold") // standalone @Alias("a stock of &lt;symbol&gt; and a &lt;threshold&gt;") // examples table public void aStock(@Named("symbol") String symbol, @Named("threshold") double threshold) { // ... } </code></pre> <p>you can refer <a href="http://jbehave.org/reference/preview/aliases.html" rel="nofollow">This Link</a> for more info.</p> <p>please let me know if it works .</p>