@Test public void addCollaborator() { when(this.accessManager.addCollaborator(Matchers.same(this.entity), Matchers.any(Collaborator.class))) .thenReturn(true); Assert.assertTrue(this.entityAccess.addCollaborator(COLLABORATOR, mock(AccessLevel.class))); }
@Override public boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access) { Collaborator collaborator = new DefaultCollaborator(user, access, null); return this.accessManager.addCollaborator(this.entity, collaborator); }
DefaultEntityAccess implements EntityAccess { @Override public boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access) { Collaborator collaborator = new DefaultCollaborator(user, access, null); return this.accessManager.addCollaborator(this.entity, collaborator); } }
DefaultEntityAccess implements EntityAccess { @Override public boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access) { Collaborator collaborator = new DefaultCollaborator(user, access, null); return this.accessManager.addCollaborator(this.entity, collaborator); } DefaultEntityAccess(
        @Nullable final PrimaryEntity entity,
        @Nonnull final EntityAccessHelper helper,
        @Nonnull final EntityAccessManager accessManager,
        @Nonnull final EntityVisibilityManager visibilityManager); }
DefaultEntityAccess implements EntityAccess { @Override public boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access) { Collaborator collaborator = new DefaultCollaborator(user, access, null); return this.accessManager.addCollaborator(this.entity, collaborator); } DefaultEntityAccess(
        @Nullable final PrimaryEntity entity,
        @Nonnull final EntityAccessHelper helper,
        @Nonnull final EntityAccessManager accessManager,
        @Nonnull final EntityVisibilityManager visibilityManager); @Nullable @Override PrimaryEntity getEntity(); @Nullable @Override Owner getOwner(); @Override boolean isOwner(); @Override boolean isOwner(@Nullable final EntityReference user); @Override boolean setOwner(@Nullable EntityReference userOrGroup); @Nonnull @Override Visibility getVisibility(); @Override boolean setVisibility(@Nullable Visibility newVisibility); @Nonnull @Override Collection<Collaborator> getCollaborators(); @Override boolean updateCollaborators(@Nullable Collection<Collaborator> newCollaborators); @Override boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access); @Override boolean removeCollaborator(@Nullable EntityReference user); @Override boolean removeCollaborator(@Nullable Collaborator collaborator); @Nonnull @Override AccessLevel getAccessLevel(); @Nonnull @Override AccessLevel getAccessLevel(@Nullable EntityReference user); @Override boolean hasAccessLevel(@Nullable AccessLevel access); @Override boolean hasAccessLevel(@Nullable EntityReference user, @Nullable AccessLevel access); @Override String toString(); }
DefaultEntityAccess implements EntityAccess { @Override public boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access) { Collaborator collaborator = new DefaultCollaborator(user, access, null); return this.accessManager.addCollaborator(this.entity, collaborator); } DefaultEntityAccess(
        @Nullable final PrimaryEntity entity,
        @Nonnull final EntityAccessHelper helper,
        @Nonnull final EntityAccessManager accessManager,
        @Nonnull final EntityVisibilityManager visibilityManager); @Nullable @Override PrimaryEntity getEntity(); @Nullable @Override Owner getOwner(); @Override boolean isOwner(); @Override boolean isOwner(@Nullable final EntityReference user); @Override boolean setOwner(@Nullable EntityReference userOrGroup); @Nonnull @Override Visibility getVisibility(); @Override boolean setVisibility(@Nullable Visibility newVisibility); @Nonnull @Override Collection<Collaborator> getCollaborators(); @Override boolean updateCollaborators(@Nullable Collection<Collaborator> newCollaborators); @Override boolean addCollaborator(@Nullable EntityReference user, @Nullable AccessLevel access); @Override boolean removeCollaborator(@Nullable EntityReference user); @Override boolean removeCollaborator(@Nullable Collaborator collaborator); @Nonnull @Override AccessLevel getAccessLevel(); @Nonnull @Override AccessLevel getAccessLevel(@Nullable EntityReference user); @Override boolean hasAccessLevel(@Nullable AccessLevel access); @Override boolean hasAccessLevel(@Nullable EntityReference user, @Nullable AccessLevel access); @Override String toString();  }