For example, I have two steps. This is just an example, my step definitions, originally these are written in Russian language:
When I press the button "Enter"
When I have pressed the button "Enter"
So, as the result we have two methods:
@When("^I press the button \"([^\"]*)\"$")
public void iPressTheButton(String arg1){ }
@When("^I have pressed the button \"([^\"]*)\"$")
public void iHavePressedTheButton(String arg1){ }
The main idea is, that these two methods do the same thing, but due to lexical difference of the description I can't unify them. So, maybe, I need to do something with regExp? In fact we need to say something like that: "If we have 'I press' or 'I have pressed' in the begining of the phrase (... button \"([^\"]*)\"), then we call the function".
Or there is some way to do something with annotations?