### Question:
SourceConfigurationParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { protected void onRuntimeNameChange() { if (!getRuntime().isEmpty()) { view.setRuntimeStatus(FormStatus.VALID); } else { view.setRuntimeStatus(FormStatus.ERROR); } onContentChange(); } @Inject  SourceConfigurationParamsPresenter(final View view,
                                              final Caller<SourceService> sourceService); @PostConstruct void init(); @Override IsElement getView(); @Override String getWizardTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); @Override Map<String, String> buildParams(); @Override void clear(); void disable(); static final String REPO_NAME; static final String BRANCH; static final String MODULE_DIR; }### Answer:
@Test public void testOnRuntimeChangeValid() { when(view.getRuntimeName()).thenReturn(RUNTIME_NAME); presenter.onRuntimeNameChange(); verify(view, times(1)).setRuntimeStatus(FormStatus.VALID); verifyHandlerNotified(); }
@Test public void testOnRuntimeChangeInvalid() { when(view.getRuntimeName()).thenReturn(EMPTY_STRING); presenter.onRuntimeNameChange(); verify(view, times(1)).setRuntimeStatus(FormStatus.ERROR); verifyHandlerNotified(); }