@Test public void testCloneService() throws Exception { NullService mockService = new NullService(getName()); SharedService sharedService = new SharedService(getName()); Adapter adapter = createAdapterForSharedService(sharedService, mockService); try { LifecycleHelper.prepare(adapter); LifecycleHelper.init(adapter); assertTrue(sharedService.cloneService()); assertFalse(mockService == sharedService.getClonedService()); assertEquals(mockService.getUniqueId(), sharedService.getClonedService().getUniqueId()); } finally { LifecycleHelper.stopAndClose(adapter); } }
boolean cloneService() { return BooleanUtils.toBooleanDefaultIfNull(getCloneService(), true); }
SharedService extends SharedServiceImpl { boolean cloneService() { return BooleanUtils.toBooleanDefaultIfNull(getCloneService(), true); } }
SharedService extends SharedServiceImpl { boolean cloneService() { return BooleanUtils.toBooleanDefaultIfNull(getCloneService(), true); } SharedService();  SharedService(String lookupName); }
SharedService extends SharedServiceImpl { boolean cloneService() { return BooleanUtils.toBooleanDefaultIfNull(getCloneService(), true); } SharedService();  SharedService(String lookupName); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Override void prepare(); @Override void doService(AdaptrisMessage msg); @Override boolean isBranching(); Boolean getCloneService(); void setCloneService(Boolean cloneService); }
SharedService extends SharedServiceImpl { boolean cloneService() { return BooleanUtils.toBooleanDefaultIfNull(getCloneService(), true); } SharedService();  SharedService(String lookupName); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Override void prepare(); @Override void doService(AdaptrisMessage msg); @Override boolean isBranching(); Boolean getCloneService(); void setCloneService(Boolean cloneService);  }