IOC { public static void remove(final IKey key) throws DeletionException { container.remove(key); } private  IOC(); static IKey getIocKey(); static IKey getKeyForKeyStorage(); static T resolve(final IKey key, final Object ... args); static void register(final IKey key, final IResolveDependencyStrategy strategy); static void remove(final IKey key);  }
@Test public void checkDeletion() throws Exception { IKey key = mock(IKey.class); doNothing().when(container).remove(key); IOC.remove(key); verify(container, times(1)).remove(key); }