JettyAsyncWorkflowInterceptor extends JettyWorkflowInterceptorImpl { public void setMode(Mode m) { this.mode = Args.notNull(m, "mode"); }  @Override void init(); @Override void workflowStart(AdaptrisMessage inputMsg); @Override void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg); Mode getMode(); void setMode(Mode m); JettyAsyncWorkflowInterceptor withMode(JettyAsyncWorkflowInterceptor.Mode m); static boolean cacheContains(String msgId); static boolean removeEntry(String msgId); String getCacheKey(); void setCacheKey(String s); JettyAsyncWorkflowInterceptor withCacheKey(String s);  }
@Test public void testLifecycle() throws Exception { JettyAsyncWorkflowInterceptor interceptor = new JettyAsyncWorkflowInterceptor(); try { LifecycleHelper.initAndStart(interceptor); fail(); } catch (CoreException expected) { } interceptor.setMode(JettyAsyncWorkflowInterceptor.Mode.REQUEST); try { LifecycleHelper.initAndStart(interceptor); } finally { LifecycleHelper.stopAndClose(interceptor, false); } }