### Question:
DataModellerDocksHandler extends AbstractWorkbenchDocksHandler { public void onContextChange(@Observes DataModelerWorkbenchContextChangeEvent contextEvent) { DataModelerContext newContext = dataModelerWBContext.getActiveContext(); boolean doRefresh; if (newContext == null) { doRefresh = true; dataModelerIsHidden = true; } else if (!newContext.equals(lastActiveContext) || (newContext.equals(lastActiveContext) && !newContext.getEditionMode().equals(lastEditionMode))) { doRefresh = true; dataModelerIsHidden = !isGraphicMode(newContext); lastEditionMode = newContext.getEditionMode(); } else { doRefresh = false; } lastActiveContext = newContext; refreshDocks(doRefresh, dataModelerIsHidden); } @Inject  DataModellerDocksHandler(SessionInfo sessionInfo,
                                    AuthorizationManager authorizationManager,
                                    DataModelerWorkbenchContext dataModelerWBContext); boolean isGraphicMode(DataModelerContext context); @Override Collection<UberfireDock> provideDocks(String perspectiveIdentifier); void onContextChange(@Observes DataModelerWorkbenchContextChangeEvent contextEvent); void onDataModelerWorkbenchFocusEvent(@Observes DataModelerWorkbenchFocusEvent event);  }### Answer:
@Test public void testChangeDataModelerContextSameContextSourceMode() { testSetDataModelerFocusEventWithPlanner(); originalContext.setEditionMode(DataModelerContext.EditionMode.SOURCE_MODE); handler.onContextChange(new DataModelerWorkbenchContextChangeEvent()); assertTrue(handler.shouldRefreshDocks()); assertTrue(handler.shouldDisableDocks()); verify(command, times(2)).execute(); }