Cucumber with Guice - multiple guice injector
问题 I'm using Cucumber with Guice as DI. I've encountered following problem: I've got one step i.e. class MyStep() { @Inject private MyService myService; @Given("Some acction happen") public void sthHappen() { myService.doSth(); } } And I've got this class to run it as JUnit test @RunWith(Cucumber.class) @CucumberOptions(...) public class MyTest { } There is a class MyModule extends AbstractModule { @Override protected void configure() { bind(MyService.class).to(MyFirstService.class); } } which