Executor executor = new ThreadPoolExecutor( 1, 10, 3600, TimeUnit.SECONDS, new SynchronousQueue() );
ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
factory.setServiceName( "foo" );
factory.setExecutor( executor );
factory.afterPropertiesSet();
ExecutorThreadModel threadModel = ( ExecutorThreadModel ) factory.getObject();
assertSame( executor, threadModel.getExecutor() );
}