RequiredRolesListItemPresenter extends ListItemPresenter<SingleValueItemObjectModel, DeploymentsRequiredRolesPresenter, RequiredRolesListItemPresenter.View> { @Override public void remove() { super.remove(); parentPresenter.fireChangeEvent(); } @Inject  RequiredRolesListItemPresenter(final View view); @Override RequiredRolesListItemPresenter setup(final SingleValueItemObjectModel role,
                                                final DeploymentsRequiredRolesPresenter parentPresenter); @Override void remove(); void onRoleChange(final String role); @Override SingleValueItemObjectModel getObject();  }
@Test public void testRemove() { final DeploymentsRequiredRolesPresenter parentPresenter = mock(DeploymentsRequiredRolesPresenter.class); final RequiredRolesListPresenter listPresenter = mock(RequiredRolesListPresenter.class); requiredRolesListItemPresenter.parentPresenter = parentPresenter; requiredRolesListItemPresenter.setListPresenter(listPresenter); requiredRolesListItemPresenter.remove(); verify(listPresenter).remove(eq(requiredRolesListItemPresenter)); verify(parentPresenter).fireChangeEvent(); }