use of org.apache.camel.component.splunk.event.SplunkEvent in project camel by apache.
the class ProducerTest method testSubmitWriter.
@Test
public void testSubmitWriter() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:submitresult");
mock.setExpectedMessageCount(1);
SplunkEvent splunkEvent = new SplunkEvent();
splunkEvent.addPair("key1", "value1");
splunkEvent.addPair("key2", "value2");
splunkEvent.addPair("key3", "value1");
template.sendBody("direct:submit", splunkEvent);
assertMockEndpointsSatisfied();
Producer submitProducer = submitEndpoint.createProducer();
assertIsInstanceOf(SubmitDataWriter.class, ((SplunkProducer) submitProducer).getDataWriter());
}
Aggregations