How to write scenario outline to capture list of object in a single argument?
03:10 20 Mar 2016

When writing cucumber scenario outline test cases, sometimes I have requirement that I need one of the placeholder to hold a list of data instead of one. See below pseudo example:

Scenario Outline: example
Given I have  
When I choose 
Then I should receive   //instead of a single result

Examples:
| input_1        | input_2        | result                 |
| input_1_case_1 | input_2_case_1 | result_1_case_1_part_1 |
|                |                | result_1_case_1_part_2 |
|                |                | result_1_case_1_part_3 |

In the above example, my "result" need to capture a list of object for each single input_1 and input_2 parameter. But with the above writing, cucumber will not compile the last statement to something like:

@Then("....")
public void i_should_receive(Datatable or list of object) throws Throwable {
    // Write code here that turns the phrase above into concrete actions
    throw new PendingException();
}

How can write my cucumber script to achieve what I want?

cucumber cucumber-jvm gherkin