How to pass assertions with Java-Cucumber?

How to pass assertions with Java-Cucumber?

Hello Jacqueline-bosco,

You can refer to the below example using assertEquals:

public class Example {

    @Then("the result should be {int}")
    public void the_result_should_be(int expectedResult) {
        assertEquals(expectedResult, result);
    }
}