### Question:
ParallelExecutorService { public ExecutorService getExecutorService() { ExecutorService instance = executorService; if (instance == null) { synchronized (this) { instance = executorService; if (instance == null) { instance = createExecutorService(); executorService = instance; } } } return instance; }  ExecutorService getExecutorService();  }### Answer:
@Test @Transactional(propagation = Propagation.REQUIRED) public void testGetExecutorService() throws InterruptedException { ExecutorService service1 = parallelExecutorService.getExecutorService(); Preference maxThreads = SystemPreferences.CLUSTER_NODEUP_MAX_THREADS.toPreference(); maxThreads.setValue("2"); preferenceManager.update(Collections.singletonList(maxThreads)); Thread.sleep(TIMEOUT); ExecutorService service2 = parallelExecutorService.getExecutorService(); Assert.assertNotEquals(service1, service2); }