### Question:
TemplateParamsFormPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { @Override public void initialise() { templateLoaded = false; openShiftClientService.call(getDefaultSettingsSuccessCallback(), popupHelper.getPopupErrorCallback()).getDefaultSettings(); } @Inject  TemplateParamsFormPresenter(final View view,
                                       final TemplateParamsTablePresenter paramsEditorPresenter,
                                       final TranslationService translationService,
                                       final PopupHelper popupHelper,
                                       final Caller<OpenShiftClientService> openShiftClientService,
                                       final OpenShiftClientValidationService openShiftClientValidationService); @PostConstruct void init(); @Override String getWizardTitle(); @Override View getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void isComplete(final Callback<Boolean> callback); @Override void clear(); static final String PARAM_DELIMITER; static final String PARAM_ASSIGNER; static final String CONTAINER_DELIMITER; static final String RESOURCE_TEMPLATE_PARAM_VALUES; static final String RESOURCE_TEMPLATE_URI; static final String RESOURCE_SECRETS_URI; static final String RESOURCE_STREAMS_URI; static final String APPLICATION_NAME; static final String PROJECT_NAME; static final String SERVICE_NAME; static final String KIE_SERVER_CONTAINER_DEPLOYMENT; static final String IMAGE_STREAM_NAMESPACE_TEMPLATE_PARAM; static final String APPLICATION_NAME_TEMPLATE_PARAM; static final String SERVICE_NAME_SUFFIX; static final String HORNETQ_QUEUES; static final String HORNETQ_TOPICS; static final String HORNETQ_CLUSTER_PASSWORD; }### Answer:
@Test public void testInitializeSuccessful() { DefaultSettings defaultSettings = mock(DefaultSettings.class); when(defaultSettings.getValue(DefaultSettings.DEFAULT_OPEN_SHIFT_TEMPLATE)).thenReturn(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE); when(defaultSettings.getValue(DefaultSettings.DEFAULT_OPEN_SHIFT_IMAGE_STREAMS)).thenReturn(DEFAULT_OPEN_SHIFT_IMAGE_STREAMS_VALUE); when(defaultSettings.getValue(DefaultSettings.DEFAULT_OPEN_SHIFT_SECRETS)).thenReturn(DEFAULT_OPEN_SHIFT_SECRETS_VALUE); when(openShiftClientService.getDefaultSettings()).thenReturn(defaultSettings); when(openShiftClientService.getTemplateModel(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE)).thenReturn(templateDescriptorModel); presenter.initialise(); verify(view, times(1)).setTemplateURL(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE); verify(view, times(1)).setImageStreamsURL(DEFAULT_OPEN_SHIFT_IMAGE_STREAMS_VALUE); verify(view, times(1)).setSecretsFileURL(DEFAULT_OPEN_SHIFT_SECRETS_VALUE); }
@Test public void testInitializeFailed() { when(openShiftClientService.getTemplateModel(DEFAULT_OPEN_SHIFT_TEMPLATE_VALUE)).thenReturn(templateDescriptorModel); prepareServiceCallerError(openShiftClientService, openshiftClientServiceCaller); presenter.initialise(); verify(errorCallback, times(1)).error(any(Message.class), exceptionCaptor.capture()); assertEquals(SERVICE_CALLER_EXCEPTION_MESSAGE, exceptionCaptor.getValue().getMessage()); }