MigrationEngineProvider implements Provider<MigrationEngine> { @Override public MigrationEngine get() { return factory.create(); } @Inject  MigrationEngineProvider(Injector injector, NinjaProperties ninjaProperties); @Override MigrationEngine get();  }
@Test public void defaultImplementation() { NinjaPropertiesImpl ninjaProperties = new NinjaPropertiesImpl(NinjaMode.test); ninjaProperties.setProperty(NinjaConstant.MIGRATION_ENGINE_IMPLEMENTATION, null); Injector injector = Guice.createInjector(new BaseAndClassicModules(ninjaProperties)); Provider<MigrationEngine> provider = injector.getProvider(MigrationEngine.class); assertThat(provider.get(), instanceOf(MigrationEngineFlyway.class)); }