Container implements IContainer { @Override public <T> T resolve(final IKey key, final Object ... args) throws ResolutionException { try { IStrategyContainer strategyContainer = (IStrategyContainer) ScopeProvider.getCurrentScope().getValue(strategyContainerKey); IResolveDependencyStrategy strategy = strategyContainer.resolve(key); return (T) strategy.resolve(args); } catch (Throwable e) { throw new ResolutionException("Resolution of dependency failed for key " + key, e); } } Container(); @Override IKey getIocKey(); @Override IKey getKeyForKeyStorage(); @Override T resolve(final IKey key, final Object ... args); @Override void register(final IKey key, final IResolveDependencyStrategy strategy); @Override void remove(final IKey key);  }
@Test (expected = ResolutionException.class) public void checkResolutionException() throws Exception { IContainer container = new Container(); container.resolve(null, null); }