### Question:
StandardThreadExecutor extends java.util.concurrent.AbstractExecutorService { public StandardThreadExecutor(){ this(DEFAULT_MIN_SPARE_THREADS,DEFAULT_MAX_THREADS); } StandardThreadExecutor();  StandardThreadExecutor(int minSpareThreads,int maxThreads);  StandardThreadExecutor(int minSpareThreads,int maxThreads,int taskQueueCapacity); void execute(Runnable command); int getThreadPriority(); boolean isDaemon(); String getNamePrefix(); int getMaxIdleTime(); int getMaxThreads(); int getMinSpareThreads(); String getName(); void setThreadPriority(int threadPriority); void setDaemon(boolean daemon); void setNamePrefix(String namePrefix); void setMaxIdleTime(int maxIdleTime); void setMaxThreads(int maxThreads); void setMinSpareThreads(int minSpareThreads); void setName(String name); int getActiveCount(); int getSubmittedTasksCount(); long getCompletedTaskCount(); int getCorePoolSize(); int getLargestPoolSize(); int getPoolSize(); int getQueueSize(); int getQueueCapacity(); @Override void shutdown(); @Override List<Runnable> shutdownNow(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override boolean awaitTermination(long timeout, TimeUnit unit); static final int DEFAULT_MIN_SPARE_THREADS; static final int DEFAULT_MAX_THREADS; }### Answer:
@Test public void testStandardThreadExecutor(){ int minThread = 2; int maxThead = 10; StandardThreadExecutor executor = new StandardThreadExecutor(minThread,maxThead); for(int i=0;i<minThread;i++){ executor.submit(new SleepTask(10000)); } Assert.assertEquals(minThread,executor.getPoolSize()); for(int i=minThread;i<maxThead;i++){ executor.submit(new SleepTask(10000)); } Assert.assertEquals(maxThead,executor.getPoolSize()); for(int i=0;i<maxThead;i++){ executor.submit(new SleepTask(10000)); } Assert.assertEquals(maxThead,executor.getQueueSize()); try{ executor.submit(new SleepTask(10000)); Assert.fail(); }catch(RejectedExecutionException e){ Assert.assertTrue(true); } }