### Question:
ContainerConfigParamsPresenter extends AbstractHasContentChangeHandlers implements PipelineParamsForm { private void onContentChange() { configParamsChangeEvent.fire(new ContainerConfigParamsChangeEvent(new ArrayList<>(dataProvider.getList()))); fireChangeHandlers(); } @Inject  ContainerConfigParamsPresenter(final View view,
                                          final ContainerConfigPopup containerConfigPopup,
                                          final Event<ContainerConfigParamsChangeEvent> configParamsChangeEvent,
                                          final TranslationService translationService); @PostConstruct void init(); @Override IsElement getView(); @Override Map<String, String> buildParams(); @Override void initialise(); @Override void prepareView(); @Override void clear(); @Override void isComplete(final Callback<Boolean> callback); @Override String getWizardTitle();  }### Answer:
@Test public void testOnAddContainerPopupConfirmed() { List<ContainerConfig> currentElements = new ArrayList<>(); when(dataProvider.getList()).thenReturn(currentElements); prepareAndCallPopup(); ContainerConfig returnedConfig = new ContainerConfig(CONTAINER_NAME_VALUE, GROUP_ID_VALUE, ARTIFACT_ID_VALUE, VERSION_VALUE); okCommandCaptor.getValue().execute(returnedConfig); assertTrue(currentElements.contains(returnedConfig)); verify(configParamsChangeEvent, times(1)).fire(new ContainerConfigParamsChangeEvent(currentElements)); verify(contentChangeHandler, times(1)).onContentChange(); }
@Test public void testOnAddContainerPopupCanceled() { List<ContainerConfig> currentElements = new ArrayList<>(); when(dataProvider.getList()).thenReturn(currentElements); int originalSize = currentElements.size(); prepareAndCallPopup(); cancelCommandCaptor.getValue().execute(); assertEquals(originalSize, currentElements.size()); verify(configParamsChangeEvent, never()).fire(any()); verify(contentChangeHandler, never()).onContentChange(); }