@Before public void setUp() throws Exception { shapeHelperWrapper = Mockito.mock(ShapeHelperWrapper.class, "shapeHelperWrapper"); unoRuntimeWrapper = Mockito.mock(UnoRuntimeWrapper.class, "unoRuntimeWrapper"); Injector injector = Guice.createInjector(new TestModule(shapeHelperWrapper, unoRuntimeWrapper)); QI.setUnoRuntimeWrapper(unoRuntimeWrapper); diagramWalker = injector.getInstance(DiagramWalker.class); }