Toothpick { public static void closeScope(Object name) { synchronized (ROOT_SCOPES) { ScopeNode scope = (ScopeNode) MAP_KEY_TO_SCOPE.remove(name); if (scope != null) { ScopeNode parentScope = scope.getParentScope(); if (parentScope != null) { parentScope.removeChild(scope); } else { ConfigurationHolder.configuration.onScopeForestReset(); ROOT_SCOPES.remove(name); } removeScopeAndChildrenFromMap(scope); } } } protected  Toothpick(); static Scope openRootScope(); static Scope openRootScope(ScopeConfig scopeConfig); static boolean isRootScopeOpen(); static boolean isScopeOpen(Object name); static Scope openScopes(Object... names); static Scope openScope(Object name); static Scope openScope(Object name, ScopeConfig scopeConfig); static void closeScope(Object name); static void reset(); static void reset(Scope scope); static void release(Scope scope); static void inject(Object obj, Scope scope); static void setConfiguration(Configuration configuration);  }
@Test public void closeScope_shouldNotFail_WhenThisScopesWasNotCreated() { Toothpick.closeScope("foo"); }