EmptyStrategyContainer implements IStrategyContainer { @Override public void register(final Object key, final IResolveDependencyStrategy strategy) throws StrategyContainerException { throw new StrategyContainerException( String.format("Cannot register %s by %s in EmptyStrategyContainer", String.valueOf(strategy), String.valueOf(key))); }  @Override IResolveDependencyStrategy resolve(final Object key); @Override void register(final Object key, final IResolveDependencyStrategy strategy); @Override void remove(final Object key);  }
@Test(expected = StrategyContainerException.class) public void testRegister() throws StrategyContainerException { container.register(new Object(), mock(IResolveDependencyStrategy.class)); }