Это означает, что вы используете неправильную комбинацию банок. (Afaik Cucumber-jvm v4 не использует Gherkin 6.)
Обратите внимание, что Cucumber рекомендует использовать менеджер пакетов (Maven или Gradle) , чтобы предотвратить эту проблему и убедиться, что вы получаете правильные переходные зависимости.
Ознакомьтесь с инструкциями по установке в документации Cucumber , чтобы узнать, какие зависимости вам нужны.
Для Maven:
If you are going to use the lambda expressions API (Java 8) to write the step definitions,
add the following dependency to your pom.xml:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>
Otherwise, to write them using annotated methods,
add the following dependency to your pom.xml:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>