@Before
public void setUp() {
when(popupHelper.getPopupErrorCallback()).thenReturn(errorCallback);
exceptionCaptor = ArgumentCaptor.forClass(Throwable.class);
initializeParams();
when(templateDescriptorModel.getParams()).thenReturn(allTemplateParams);
when(paramsEditorPresenter.getView()).thenReturn(paramsEditorPresenterView);
openshiftClientServiceCaller = spy(new CallerMock<>(openShiftClientService));
openShiftClientValidationService = new OpenShiftClientValidationService(openshiftClientServiceCaller);
presenter = spy(new TemplateParamsFormPresenter(view,
paramsEditorPresenter,
translationService,
popupHelper,
openshiftClientServiceCaller,
openShiftClientValidationService));
presenter.init();
verify(view,
times(1)).init(presenter);
verify(view,
times(1)).setParamsEditorPresenter(paramsEditorPresenterView);
verify(paramsEditorPresenter,
times(1)).setParamChangeHandler(any());
}