### Question:
Pools { static ExecutorService createDefaultPool() { int corePoolSize, maxPoolSize; if (GdsEdition.instance().isOnEnterpriseEdition()) { corePoolSize = Runtime.getRuntime().availableProcessors(); maxPoolSize = corePoolSize * 2; } else { corePoolSize = maxPoolSize = CONCURRENCY_LIMITATION; } return new ThreadPoolExecutor( corePoolSize, maxPoolSize, 30L, TimeUnit.SECONDS, new ArrayBlockingQueue<>(corePoolSize * 50), NamedThreadFactory.daemon(THREAD_NAME_PREFIX), new CallerBlocksPolicy() ); } private  Pools(); static ExecutorService createDefaultSingleThreadPool(); static final ExecutorService DEFAULT; static final ExecutorService DEFAULT_SINGLE_THREAD_POOL; }### Answer:
@Test void shouldGetLimitedPool() { GdsEdition.instance().setToCommunityEdition(); ThreadPoolExecutor defaultPool = (ThreadPoolExecutor) Pools.createDefaultPool(); assertEquals(4, defaultPool.getCorePoolSize()); assertEquals(4, defaultPool.getMaximumPoolSize()); }
@Test void shouldGetUnlimitedPool() { GdsEdition.instance().setToEnterpriseEdition(); ThreadPoolExecutor defaultPool = (ThreadPoolExecutor) Pools.createDefaultPool(); int availableProcessors = Runtime.getRuntime().availableProcessors(); assertEquals(availableProcessors, defaultPool.getCorePoolSize()); assertEquals(2 * availableProcessors, defaultPool.getMaximumPoolSize()); }