Toothpick { public static void release(Scope scope) { ScopeNode scopeNode = (ScopeNode) scope; scopeNode.release(); } 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 release_shouldCallScopeRelease() { Scope scope = mock(ScopeNode.class); doNothing().when(scope).release(); Toothpick.release(scope); verify(scope, Mockito.atLeastOnce()).release(); }