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