### Question:
SharedGuiceModule extends AbstractModule { @Provides @Inject @Singleton ThreadMonitor provideThreadMonitor(ExecutorServiceFactory factory, ShutdownManager wrapper, @Named(DEBUG_THREAD_MANAGER) Debug debug) { return new ThreadMonitor(factory.createCachedThreadPool(DEBUG_THREAD_MANAGER), wrapper, debug); }   static final String DEBUG_THREAD_MANAGER; }### Answer:
@Test public void shouldCreatePoolWithFactory() { ExecutorServiceFactory mockFactory = mock(ExecutorServiceFactory.class); new SharedGuiceModule().provideThreadMonitor(mockFactory, mock(ShutdownManager.class), mock(Debug.class)); verify(mockFactory).createCachedThreadPool(anyString()); }