### Question:
RoleItemPresenter extends ListItemPresenter<RolePermissions, BranchManagementPresenter, RoleItemPresenter.View> { @Override public RoleItemPresenter setup(final RolePermissions rolePermissions, final BranchManagementPresenter parentPresenter) { view.init(this); this.rolePermissions = rolePermissions; this.parentPresenter = parentPresenter; view.setRoleName(rolePermissions.getRoleName()); view.setCanRead(rolePermissions.canRead()); view.setCanWrite(rolePermissions.canWrite()); view.setCanDelete(rolePermissions.canDelete()); view.setCanDeploy(rolePermissions.canDeploy()); if ("master".equals(parentPresenter.selectedBranch)) { view.disableCanRead(); } return this; } @Inject  RoleItemPresenter(final View view); @Override RoleItemPresenter setup(final RolePermissions rolePermissions,
                                   final BranchManagementPresenter parentPresenter); void setCanRead(boolean canRead); void setCanWrite(boolean canWrite); void setCanDelete(boolean canDelete); void setCanDeploy(boolean canDeploy); @Override RolePermissions getObject();  }### Answer:
@Test public void setupTest() { verify(view).init(presenter); assertSame(rolePermissions, presenter.rolePermissions); assertSame(branchManagementPresenter, presenter.parentPresenter); verify(view).setRoleName("myRole"); verify(view).setCanRead(true); verify(view).setCanWrite(true); verify(view).setCanDelete(true); verify(view).setCanDeploy(true); }