MongoDbFeatureExecutor extends AbstractDbFeatureExecutor<Document, MongoDatabase> { @Override protected DbFeature<MongoDatabase> createSeedDataFeature(final DataSeedStrategy dataSeedStrategy, final List<Document> initialDataSets) { return (final MongoDatabase connection) -> { final MongoDbOperation operation = dataSeedStrategy.provide(new DataSeedStrategyProvider()); operation.execute(connection, mergeDataSets(initialDataSets)); }; } MongoDbFeatureExecutor(final FeatureResolver featureResolver);   }
@SuppressWarnings("unchecked") @Test public void testSeedDataFeatureExecution() throws DbFeatureException { when(dataSeedStrategy.provide(any(DataSeedStrategy.StrategyProvider.class))).thenReturn(operation); final DbFeature<MongoDatabase> feature = featureExecutor.createSeedDataFeature(dataSeedStrategy, Arrays.asList(new Document(), new Document())); assertThat(feature, notNullValue()); feature.execute(connection); verify(operation).execute(eq(connection), any(Document.class)); }