RequiredRolesListItemPresenter extends ListItemPresenter<SingleValueItemObjectModel, DeploymentsRequiredRolesPresenter, RequiredRolesListItemPresenter.View> { @Override public RequiredRolesListItemPresenter setup(final SingleValueItemObjectModel role, final DeploymentsRequiredRolesPresenter parentPresenter) { this.roleModel = role; this.parentPresenter = parentPresenter; view.init(this); view.setRole(role.getValue()); return this; } @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 testSetup() { requiredRolesListItemPresenter.setup(new SingleValueItemObjectModel("Role"), mock(DeploymentsRequiredRolesPresenter.class)); verify(view).init(eq(requiredRolesListItemPresenter)); verify(view).setRole(eq("Role")); }