public void testAdapterStateSummaryAdapterStart() throws Exception {
   Adapter a = new Adapter();
   a.setUniqueId(DEFAULT_KEY);
   a.getChannelList().addChannel(new Channel());
   LifecycleHelper.init(a);
   LifecycleHelper.start(a);
   AdapterStateSummary summary = new AdapterStateSummary(a);
   assertEquals(DEFAULT_KEY, summary.getAdapterState().getKey());
   assertEquals(StartedState.class.getName(), summary.getAdapterState().getValue());
   assertNotNull(summary.getLastStopTime());
   assertNotNull(summary.getLastStartTime());
 }
 @Override
 protected void initService() throws CoreException {
   super.initService();
   if (connection == null) throw new CoreException("Null Connection");
   if (consumer == null) throw new CoreException("Consumer is null");
   LifecycleHelper.init(connection);
 }
 @Override
 protected void initService() throws CoreException {
   if (connection == null) {
     throw new CoreException("Null Connection");
   }
   if (jmsConsumer == null) {
     throw new CoreException("Null consumer");
   }
   LifecycleHelper.init(connection);
   try {
     session =
         getConnection()
             .retrieveConnection(JmsConnection.class)
             .createSession(false, configuredAcknowledgeMode());
   } catch (JMSException e) {
     throw new CoreException(e);
   }
 }
 @Override
 protected void closeService() {
   LifecycleHelper.stop(service);
   super.closeService();
 }
 @Override
 protected void initService() throws CoreException {
   LifecycleHelper.registerEventHandler(service, eventHandler);
   super.initService();
   LifecycleHelper.init(service);
 }
 /** @see com.adaptris.core.AdaptrisComponent#stop() */
 @Override
 public void stop() {
   LifecycleHelper.stop(service);
   super.stop();
 }
 /** @see com.adaptris.core.AdaptrisComponent#start() */
 @Override
 public void start() throws CoreException {
   LifecycleHelper.start(service);
   super.start();
 }
 @Override
 protected void closeService() {
   LifecycleHelper.close(connection);
 }
 @Override
 public void stop() {
   super.stop();
   LifecycleHelper.stop(connection);
 }
 @Override
 public void start() throws CoreException {
   super.start();
   LifecycleHelper.start(connection);
 }