Code example for FutureTask

Methods: get

-1
		assertEquals(1, getCorePoolSize(executor));
		assertEquals(Integer.MAX_VALUE, getMaxPoolSize(executor));
		assertEquals(Integer.MAX_VALUE, getQueueCapacity(executor));
		assertEquals(60, getKeepAliveSeconds(executor));
		assertEquals(false, getAllowCoreThreadTimeOut(executor));
		FutureTask<String> task = new FutureTask<String>(new Callable<String>() {
			@Override 
			public String call() throws Exception {
				return "foo"; 
			} 
		}); 
		((ThreadPoolTaskExecutor)executor).execute(task);
		assertEquals("foo", task.get());
	} 
 
	@Test
	public void singleSize() { 
		Object executor = this.context.getBean("singleSize");
		assertEquals(42, getCorePoolSize(executor));
		assertEquals(42, getMaxPoolSize(executor));