@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);
 }
 public void testAdapterStateSummaryAdapterInit() throws Exception {
   Adapter a = new Adapter();
   a.setUniqueId(DEFAULT_KEY);
   a.getChannelList().addChannel(new Channel());
   LifecycleHelper.init(a);
   AdapterStateSummary summary = new AdapterStateSummary(a);
   assertEquals(DEFAULT_KEY, summary.getAdapterState().getKey());
   assertEquals(InitialisedState.class.getName(), summary.getAdapterState().getValue());
   assertNotNull(summary.getLastStopTime());
   assertNull(summary.getLastStartTime());
 }
 @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 initService() throws CoreException {
   LifecycleHelper.registerEventHandler(service, eventHandler);
   super.initService();
   LifecycleHelper.init(service);
 }