public virtual void TestHandlingApplicationFinishedEvent() { DeletionService delService = new DeletionService(null); NonAggregatingLogHandler aggregatingLogHandler = new NonAggregatingLogHandler(new InlineDispatcher(), delService, dirsHandler, new NMNullStateStoreService()); dirsHandler.Init(conf); dirsHandler.Start(); delService.Init(conf); delService.Start(); aggregatingLogHandler.Init(conf); aggregatingLogHandler.Start(); // It should NOT throw RejectedExecutionException aggregatingLogHandler.Handle(new LogHandlerAppFinishedEvent(appId)); aggregatingLogHandler.Stop(); // It should NOT throw RejectedExecutionException after stopping // handler service. aggregatingLogHandler.Handle(new LogHandlerAppFinishedEvent(appId)); aggregatingLogHandler.Close(); }