RiverName riverName = new RiverName("mongodb", river);
// InputStream in =
// getClass().getResourceAsStream("/org/elasticsearch/river/mongodb/test-mongodb-river-simple-definition.json");
String settings = getJsonSettings(jsonDefinition, 3, database, collection, index);
InputStream in = new ByteArrayInputStream(settings.getBytes());
RiverSettings riverSettings = new RiverSettings(ImmutableSettings.settingsBuilder().build(), XContentHelper.convertToMap(
Streams.copyToByteArray(in), false).v2());
ScriptService scriptService = null;
MongoDBRiverDefinition definition = MongoDBRiverDefinition.parseSettings(riverName.name(),
RiverIndexName.Conf.DEFAULT_INDEX_NAME, riverSettings, scriptService);
Assert.assertNotNull(definition);