use of org.apache.camel.model.SetHeaderDefinition in project ddf by codice.
the class ContentDirectoryMonitorTest method testDirectoryMonitorWithParameters.
@Test
public void testDirectoryMonitorWithParameters() {
ContentDirectoryMonitor monitor = createContentDirectoryMonitor();
submitConfigOptions(monitor, monitoredDirectoryPath, ContentDirectoryMonitor.MOVE, ATTRIBUTE_OVERRIDES, 1, 1000);
RouteDefinition routeDefinition = camelContext.adapt(ModelCamelContext.class).getRouteDefinitions().get(0);
ProcessorDefinition<?> firstProcessor = routeDefinition.getOutputs().get(0);
assertThat(firstProcessor, is(instanceOf(SetHeaderDefinition.class)));
assertThat(((SetHeaderDefinition) firstProcessor).getExpression().evaluate(exchange, String.class), is("{test2=[(some,parameter,with,commas)], test1=[someParameter1, someParameter0]}"));
}
Aggregations