@@ -0,0 +1,978 @@
+package org.ovirt.engine.core.bll;%0A%0Aimport org.junit.rules.TestWatcher;%0Aimport org.mockito.Mockito;%0Aimport org.ovirt.engine.core.di.Injector;%0A%0Aimport java.lang.reflect.Field;%0A%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class InjectorRule extends TestWatcher %7B%0A%0A    // create a new injector instance%0A    private Injector mockedInjector = mock(Injector.class);%0A%0A    public InjectorRule() %7B%0A        try %7B%0A            // set the internal injector%0A            Field holdingMember = Injector.class.getDeclaredField(%22injector%22);%0A            holdingMember.setAccessible(true);%0A            holdingMember.set(Injector.class, mockedInjector);%0A        %7D catch (Exception e) %7B%0A            // if something bad happened the test shouldn't run%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%0A    public %3CT%3E void bind(Class%3CT%3E pureClsType, T instance) %7B%0A        when(mockedInjector.instanceOf(pureClsType)).thenReturn(instance);%0A    %7D%0A%0A%7D%0A

create a Junit rule for o.o.e.c.di.Injector