NamedObjectItemPresenter extends ListItemPresenter<ItemObjectModel, Section<?>, NamedObjectItemPresenter.View> implements ObjectPresenter { @Override public void signalParameterAddedOrRemoved() { view.setParametersCount(model.getParameters().size()); fireChangeEvent(); } @Inject  NamedObjectItemPresenter(final View view,
                                    final ParametersModal parametersModal); @Override NamedObjectItemPresenter setup(final ItemObjectModel model,
                                          final Section<?> parentPresenter); @Override void remove(); void onNameChange(final String name); void onValueChange(String value); @Override void fireChangeEvent(); void showParametersModal(); @Override ItemObjectModel getObject(); @Override void signalParameterAddedOrRemoved();  }
@Test public void testSignalParameterAddedOrRemoved() { final DeploymentsSectionPresenter parentPresenter = mock(DeploymentsSectionPresenter.class); namedObjectItemPresenter.parentPresenter = parentPresenter; namedObjectItemPresenter.model = new ItemObjectModel("Name", "Value", "mvel", ImmutableList.of(new Parameter("Foo", "Bar"))); namedObjectItemPresenter.signalParameterAddedOrRemoved(); verify(view).setParametersCount(eq(1)); verify(parentPresenter).fireChangeEvent(); }