ExecutionContext implements ThreadPoolFactory, Cloneable, NamespaceRegistry.Holder { public String getId() { return id; } @SuppressWarnings( "synthetic-access" )  ExecutionContext(); protected  ExecutionContext( ExecutionContext context ); protected  ExecutionContext( SecurityContext securityContext,
                                NamespaceRegistry namespaceRegistry,
                                PropertyFactory propertyFactory,
                                ThreadPoolFactory threadPoolFactory,
                                BinaryStore binaryStore,
                                Map<String, String> data,
                                String processId,
                                TextDecoder decoder,
                                TextEncoder encoder,
                                StringFactory stringFactory,
                                BinaryFactory binaryFactory,
                                ValueFactory<Boolean> booleanFactory,
                                DateTimeFactory dateFactory,
                                ValueFactory<BigDecimal> decimalFactory,
                                ValueFactory<Double> doubleFactory,
                                ValueFactory<Long> longFactory,
                                NameFactory nameFactory,
                                PathFactory pathFactory,
                                ReferenceFactory referenceFactory,
                                ReferenceFactory weakReferenceFactory,
                                ReferenceFactory simpleReferenceFactory,
                                UriFactory uriFactory,
                                ValueFactory<Object> objectFactory, 
                                Locale locale ); Logger getLogger( Class<?> clazz ); Logger getLogger( String name ); SecurityContext getSecurityContext(); @Override NamespaceRegistry getNamespaceRegistry(); final PropertyFactory getPropertyFactory(); ValueFactories getValueFactories(); BinaryStore getBinaryStore(); @Override ExecutorService getThreadPool( String name ); @Override void releaseThreadPool( ExecutorService pool ); @Override ExecutorService getCachedTreadPool( String name, int maxPoolSize ); @Override ScheduledExecutorService getScheduledThreadPool( String name ); @Override void terminateAllPools( long maxWaitTime,
                                   TimeUnit timeUnit ); String getId(); String getProcessId(); Map<String, String> getData(); TextDecoder getDecoder(); ExecutionContext with( BinaryStore binaryStore ); ExecutionContext with( NamespaceRegistry namespaceRegistry ); ExecutionContext with( ThreadPoolFactory threadPoolFactory ); ExecutionContext with( PropertyFactory propertyFactory ); ExecutionContext with( SecurityContext securityContext ); ExecutionContext with( Map<String, String> data ); ExecutionContext with( String key,
                                  String value ); ExecutionContext with( String processId ); ExecutionContext with(Locale locale); @Override ExecutionContext clone(); @Override String toString(); static final ExecutionContext DEFAULT_CONTEXT; }
@Test public void shouldHaveIdentifierThatIsNotNull() { assertThat(context.getId(), is(notNullValue())); }
@Test public void shouldHaveIdentifierThatIsNotBlank() { assertThat(context.getId().length(), is(not(0))); assertThat(context.getId().trim().length(), is(not(0))); }
@Test public void shouldHaveIdentifierThatIsUnique() { Set<String> ids = new HashSet<String>(); for (int i = 0; i != 50; ++i) { assertThat(ids.add(new ExecutionContext().getId()), is(true)); } }