DocksBars { public void addDock(UberfireDock dock) { DocksBar docksBar = getDockBar(dock); docksBar.addDock(dock, createDockOpenCommand(dock, docksBar), createDockCloseCommand(dock, docksBar)); } @Inject  DocksBars(PlaceManager placeManager,
                     MenuBuilder menuBuilder,
                     Event<UberfireDocksInteractionEvent> dockInteractionEvent,
                     UberfireDocksContainer uberfireDocksContainer,
                     AuthorizationManager authorizationManager,
                     User identity); void setup(); void addDock(UberfireDock dock); void clearAndCollapseDocks(final UberfireDockPosition position); void clearAndHideAllDocks(); void clearAndHide(UberfireDockPosition position); void open(UberfireDock dock); void close(UberfireDock dock); void toggle(UberfireDock dock); void show(DocksBar docksBar); void show(UberfireDockPosition position); boolean isReady(UberfireDockPosition dockPosition); List<DocksBar> getDocksBars();  }
@Test public void addDock() { docksBars.setup(); DocksBar dockBar = docksBars.getDockBar(dock0); DocksBar targetDockSpy = spy(dockBar); DocksBars dockBarsSpy = spy(docksBars); when(dockBarsSpy.getDockBar(dock0)).thenReturn(targetDockSpy); dockBarsSpy.addDock(dock0); verify(targetDockSpy) .addDock(eq(dock0), any(ParameterizedCommand.class), any(ParameterizedCommand.class)); }