IOC { public static <T> T resolve(final IKey key, final Object ... args) throws ResolutionException { return (T) container.resolve(key, args); } 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 checkResolution() throws Exception { Object value = new Object(); IKey key = mock(IKey.class); Object param = new Object(); when(container.resolve(key, param)).thenReturn(value); Object result = IOC.resolve(key, param); assertSame(result, value); verify(container, times(1)).resolve(key, param); }