Search in sources :

Example 1 with MutateMapper

use of org.opensearch.dataprepper.logstash.mapping.mutate.MutateMapper in project data-prepper by opensearch-project.

the class LogstashPluginMapperTest method mapPlugin_with_custom_plugin_mapper_produces_plugins.

@Test
void mapPlugin_with_custom_plugin_mapper_produces_plugins() {
    final LogstashPlugin logstashPlugin = mock(LogstashPlugin.class);
    when(logstashPlugin.getPluginName()).thenReturn("mutate");
    when(pluginMapperProvider.getAttributesMapper(any(LogstashMappingModel.class))).thenReturn(new MutateMapper());
    final LogstashPluginMapper objectUnderTest = createObjectUnderTest();
    final List<PluginModel> pluginModels = objectUnderTest.mapPlugin(logstashPlugin);
    assertThat(pluginModels, notNullValue());
}
Also used : PluginModel(com.amazon.dataprepper.model.configuration.PluginModel) LogstashPlugin(org.opensearch.dataprepper.logstash.model.LogstashPlugin) MutateMapper(org.opensearch.dataprepper.logstash.mapping.mutate.MutateMapper) Test(org.junit.jupiter.api.Test)

Aggregations

PluginModel (com.amazon.dataprepper.model.configuration.PluginModel)1 Test (org.junit.jupiter.api.Test)1 MutateMapper (org.opensearch.dataprepper.logstash.mapping.mutate.MutateMapper)1 LogstashPlugin (org.opensearch.dataprepper.logstash.model.LogstashPlugin)1