use of com.adaptris.core.EventHandlerBase in project interlok by adaptris.
the class ExampleEventHandlerCase method testSetMarshaller.
@Test
public void testSetMarshaller() throws Exception {
EventHandlerBase eventHandler = applyConfiguration(newEventHandler(getName()));
XStreamJsonMarshaller marshaller = (XStreamJsonMarshaller) marshallerFactory.createMarshaller(MarshallingOutput.JSON);
eventHandler.setMarshaller(marshaller);
assertEquals(marshaller, eventHandler.getMarshaller());
assertEquals(marshaller, eventHandler.currentMarshaller());
eventHandler.setMarshaller(null);
assertEquals(DefaultMarshaller.getDefaultMarshaller(), eventHandler.currentMarshaller());
}
Aggregations