### Question:
AbstractScenarioSimulationDocksHandler extends AbstractWorkbenchDocksHandler { protected Optional<CheatSheetView> getCheatSheetView(PlaceRequest placeRequest) { final Activity activity = placeManager.getActivity(placeRequest); if (activity == null) { return Optional.empty(); } else { final AbstractWorkbenchActivity cheatSheetActivity = (AbstractWorkbenchActivity) activity; return Optional.of((CheatSheetView) cheatSheetActivity.getWidget()); } }  @Override Collection<UberfireDock> provideDocks(final String perspectiveIdentifier); void addDocks(); void removeDocks(); void expandToolsDock(); abstract void expandTestResultsDock(); void resetDocks(); void setScesimEditorId(String scesimEditorId); Optional<CheatSheetView.Presenter> getCheatSheetPresenter(); Optional<TestToolsView.Presenter> getTestToolsPresenter(); Optional<SettingsView.Presenter> getSettingsPresenter(); static final String SCESIMEDITOR_ID; }### Answer:
@Test public void getCheatSheetView() { CheatSheetView cheatSheetViewMock = mock(CheatSheetView.class); AbstractWorkbenchActivity activityMock = mock(AbstractWorkbenchActivity.class); when(activityMock.getWidget()).thenReturn(cheatSheetViewMock); PlaceRequest placeRequest = abstractScenarioSimulationDocksHandlerSpy.getCurrentRightDockPlaceRequest(CheatSheetPresenter.IDENTIFIER); when(placeManagerMock.getActivity(eq(placeRequest))).thenReturn(activityMock); Optional<CheatSheetView> optional = abstractScenarioSimulationDocksHandlerSpy.getCheatSheetView(placeRequest); assertSame(cheatSheetViewMock, optional.get()); }