How to use power of varargs while defining step definitions in cucumber java bindings. I have below step
Given I have following product: prod1, prod2, prod3
My Step definition
@Given("^I have following product [(exhaustive list of products or pattern of the product names)]$")
public void stepDef(String...args)
{
//Process varargs array "args" in here
}
I know workaround can be to except the complete string after colon and then in the code break the string using split(",") and dump it into array. But i just want to know if cucumber on its own supports varargs pattern.
TIA!!!