### Question:
ExecutorBoltScheduler implements BoltScheduler, BoltConnectionLifetimeListener, BoltConnectionQueueMonitor { @Override public void start() { threadPool = executorFactory.create( corePoolSize, maxPoolSize, keepAlive, queueSize, true, new NameAppendingThreadFactory( connector, scheduler.threadFactory( Group.BOLT_WORKER ) ) ); } ExecutorBoltScheduler( String connector, ExecutorFactory executorFactory, JobScheduler scheduler, LogService logService, int corePoolSize,
            int maxPoolSize, Duration keepAlive, int queueSize, ExecutorService forkJoinPool ); @Override String connector(); @Override void start(); @Override void stop(); @Override void created( BoltConnection connection ); @Override void closed( BoltConnection connection ); @Override void enqueued( BoltConnection to, Job job ); @Override void drained( BoltConnection from, Collection<Job> batch );  }### Answer:
@Test public void initShouldCreateThreadPool() throws Throwable { ExecutorFactory mockExecutorFactory = mock( ExecutorFactory.class ); when( mockExecutorFactory.create( anyInt(), anyInt(), any(), anyInt(), anyBoolean(), any() ) ).thenReturn( Executors.newCachedThreadPool() ); ExecutorBoltScheduler scheduler = new ExecutorBoltScheduler( CONNECTOR_KEY, mockExecutorFactory, jobScheduler, logService, 0, 10, Duration.ofMinutes( 1 ), 0, ForkJoinPool.commonPool() ); scheduler.start(); verify( jobScheduler ).threadFactory( Group.BOLT_WORKER ); verify( mockExecutorFactory, times( 1 ) ).create( anyInt(), anyInt(), any( Duration.class ), anyInt(), anyBoolean(), any( ThreadFactory.class ) ); }