SplitJoinService extends ServiceImp implements EventHandlerAware, ServiceWrapper { public void setTimeout(TimeInterval ttl) { timeout = ttl; } SplitJoinService(); @Override void doService(AdaptrisMessage msg); @Override void prepare(); TimeInterval getTimeout(); void setTimeout(TimeInterval ttl); @Override void registerEventHandler(EventHandler eh); Service getService(); void setService(Service s); MessageSplitter getSplitter(); void setSplitter(MessageSplitter ms); MessageAggregator getAggregator(); void setAggregator(MessageAggregator mj); @Override Service[] wrappedServices(); void setExceptionStrategy(PoolingFutureExceptionStrategy exceptionStrategy); Boolean getSendEvents(); boolean sendEvents(); void setSendEvents(Boolean b);  }
@Test public void testSetTimeout() throws Exception { TimeInterval ten = new TimeInterval(10L, TimeUnit.MINUTES); TimeInterval one = new TimeInterval(1L, TimeUnit.MINUTES); SplitJoinService service = new SplitJoinService(); assertNull(service.getTimeout()); assertEquals(ten.toMilliseconds(), service.timeoutMs()); service.setTimeout(one); assertEquals(one, service.getTimeout()); assertEquals(one.toMilliseconds(), service.timeoutMs()); service.setTimeout(null); assertNull(service.getTimeout()); assertEquals(ten.toMilliseconds(), service.timeoutMs()); }