### Question:
Scope extends BasicScope implements IScope, IScopeStatistics,
		ScopeMBean { public Scope() { this(null); } Scope();  Scope(String name); boolean addChildScope(IBasicScope scope); boolean connect(IConnection conn); boolean connect(IConnection conn, Object[] params); boolean createChildScope(String name); void destroy(); void disconnect(IConnection conn); @Override void dispatchEvent(IEvent event); int getActiveClients(); int getActiveConnections(); int getActiveSubscopes(); IBasicScope getBasicScope(String type, String name); Iterator<String> getBasicScopeNames(String type); ClassLoader getClassLoader(); Set<IClient> getClients(); Collection<Set<IConnection>> getConnections(); IContext getContext(); String getContextPath(); long getCreationTime(); @Override int getDepth(); IScopeHandler getHandler(); int getMaxClients(); int getMaxConnections(); int getMaxSubscopes(); @Override IScope getParent(); @Override String getPath(); Resource getResource(String path); Resource[] getResources(String path); IScope getScope(String name); Iterator<String> getScopeNames(); Object getServiceHandler(String name); @SuppressWarnings("unchecked") Set<String> getServiceHandlerNames(); IScopeStatistics getStatistics(); int getTotalClients(); int getTotalConnections(); int getTotalSubscopes(); @Override boolean handleEvent(IEvent event); boolean hasChildScope(String name); boolean hasChildScope(String type, String name); boolean hasContext(); boolean hasHandler(); @Override boolean hasParent(); void init(); void uninit(); boolean isEnabled(); boolean getEnabled(); boolean isRunning(); boolean getRunning(); @Override Iterator<IBasicScope> iterator(); Set<IConnection> lookupConnections(IClient client); void registerServiceHandler(String name, Object handler); void removeChildScope(IBasicScope scope); void setAutoStart(boolean autoStart); void setChildLoadPath(String pattern); void setContext(IContext context); void setDepth(int depth); void setEnabled(boolean enabled); void setHandler(IScopeHandler handler); @Override void setName(String name); void setParent(IScope parent); void setPersistenceClass(String persistenceClass); boolean start(); void stop(); @Override String toString(); void unregisterServiceHandler(String name); IServer getServer(); void lock(); void unlock();  }### Answer:
@Test public void testScope() { if (appScope == null) { appScope = (WebScope) applicationContext.getBean("web.scope"); log.debug("Application / web scope: {}", appScope); } TestCase.assertTrue(appScope.createChildScope("room1")); IScope room1 = appScope.getScope("room1"); log.debug("Room 1: {}", room1); IContext rmCtx1 = room1.getContext(); log.debug("Context 1: {}", rmCtx1); TestCase.assertTrue(room1.createChildScope("room2")); IScope room2 = room1.getScope("room2"); log.debug("Room 2: {}", room2); IContext rmCtx2 = room2.getContext(); log.debug("Context 2: {}", rmCtx2); TestCase.assertTrue(room2.createChildScope("room3")); IScope room3 = room2.getScope("room3"); log.debug("Room 3: {}", room3); IContext rmCtx3 = room3.getContext(); log.debug("Context 3: {}", rmCtx3); TestCase.assertTrue(room1.createChildScope("room4")); IScope room4 = room1.getScope("room4"); log.debug("Room 4: {}", room4); IContext rmCtx4 = room4.getContext(); log.debug("Context 4: {}", rmCtx4); TestCase.assertTrue(room4.createChildScope("room5")); IScope room5 = room4.getScope("room5"); log.debug("Room 5: {}", room5); IContext rmCtx5 = room5.getContext(); log.debug("Context 5: {}", rmCtx5); }