ScopeImpl extends ScopeNode { @Override public <T> T getInstance(Class<T> clazz) { return getInstance(clazz, null); } ScopeImpl(Object name); @Override T getInstance(Class<T> clazz); @Override T getInstance(Class<T> clazz, String name); @Override Provider<T> getProvider(Class<T> clazz); @Override Provider<T> getProvider(Class<T> clazz, String name); @Override Lazy<T> getLazy(Class<T> clazz); @Override Lazy<T> getLazy(Class<T> clazz, String name); @Override synchronized Scope installTestModules(Module... modules); @Override Scope installModules(Module... modules); @Override void inject(Object obj); @Override String toString(); @Override Scope openSubScope(Object subScopeName); @Override Scope openSubScope(Object subScopeName, ScopeConfig scopeConfig); @Override void release();  }
@Test(expected = IllegalStateException.class) public void getInstance_shouldFail_whenScopeIsClosed() { ScopeImpl scope = new ScopeImpl(""); scope.close(); scope.getInstance(Foo.class); }