GuidedTourBridge { public void registerObserver(final GuidedTourObserver observer) { observer.setMonitorBridge(this); observers.add(observer); } @Inject  GuidedTourBridge(final GuidedTourService guidedTourService,
                            final GlobalHTMLObserver globalHTMLObserver); @PostConstruct void init(); void refresh(final UserInteraction userInteraction); void registerTutorial(final Tutorial tutorial); void registerObserver(final GuidedTourObserver observer); void registerPositionProvider(final String type,
                                         final PositionProviderFunction positionProviderFunction);  }
@Test public void testRegisterObserver() { final GuidedTourObserver observer = mock(GuidedTourObserver.class); bridge.registerObserver(observer); verify(observer).setMonitorBridge(bridge); assertEquals(asList(this.observer, observer), bridge.observers); }