use of com.adaptris.core.NullMessageProducer in project interlok by adaptris.
the class ServiceUtilTest method testRewriteForTesting_RetriesConnection.
@Test
public void testRewriteForTesting_RetriesConnection() throws Exception {
MockAllowsRetriesConnection conn = new MockAllowsRetriesConnection(55);
StandaloneProducer service = new StandaloneProducer(conn, new NullMessageProducer());
StandaloneProducer rewritten = ((StandaloneProducer) rewriteConnectionsForTesting(service));
assertNotSame(conn, rewritten.getConnection());
assertNotSame(55, ((AllowsRetriesConnection) rewritten.getConnection()).getConnectionAttempts());
}
use of com.adaptris.core.NullMessageProducer in project interlok by adaptris.
the class ServiceUtilTest method createConnectedServices.
private String createConnectedServices() throws Exception {
ServiceList nestedList = new ServiceList();
nestedList.add(new StandaloneProducer(new MockAllowsRetriesConnection(6), new NullMessageProducer()));
nestedList.add(new StatelessServiceWrapper(new StandaloneProducer()));
nestedList.add(new AddMetadataService(new ArrayList(Arrays.asList(new MetadataElement[] { new MetadataElement("key", "value") }))));
ServiceList list = new ServiceList();
list.add(nestedList);
list.add(new JdbcServiceList());
return DefaultMarshaller.getDefaultMarshaller().marshal(list);
}
Aggregations