Search in sources :

Example 1 with ScheduledMessageForwardingProcessor

use of org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor in project wso2-synapse by wso2.

the class MessageProcessorSerializerTest method testSerializeMessageProcessor3.

/**
 * test serializeMessageProcessor with parameters and assert the OMElement is created.
 */
@Test
public void testSerializeMessageProcessor3() {
    Map<String, Object> parameters = new HashMap<>();
    MessageProcessor messageProcessor = new ScheduledMessageForwardingProcessor();
    messageProcessor.setName("testStore");
    parameters.put("interval", "1000");
    messageProcessor.setParameters(parameters);
    messageProcessor.setDescription("testMessageProcessor");
    messageProcessor.setTargetEndpoint("target");
    messageProcessor.setMessageStoreName("testMessageStore");
    OMElement element = MessageProcessorSerializer.serializeMessageProcessor(null, messageProcessor);
    Assert.assertNotNull("OMElement is not returned", element);
}
Also used : HashMap(java.util.HashMap) MessageProcessor(org.apache.synapse.message.processor.MessageProcessor) ScheduledMessageForwardingProcessor(org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor) OMElement(org.apache.axiom.om.OMElement) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 OMElement (org.apache.axiom.om.OMElement)1 MessageProcessor (org.apache.synapse.message.processor.MessageProcessor)1 ScheduledMessageForwardingProcessor (org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor)1 Test (org.junit.Test)1