@Test public void getType() throws ComponentLookupException { Collaborator c = new DefaultCollaborator(COLLABORATOR, this.access, this.helper); Mockito.when(this.helper.getType(COLLABORATOR)).thenReturn("user", "group", "unknown", null); Assert.assertEquals("user", c.getType()); Assert.assertEquals("group", c.getType()); Assert.assertEquals("unknown", c.getType()); Assert.assertNull(c.getType()); }
@Override public String getType() { return this.helper.getType(this.user); }
DefaultCollaborator implements Collaborator { @Override public String getType() { return this.helper.getType(this.user); } }
DefaultCollaborator implements Collaborator { @Override public String getType() { return this.helper.getType(this.user); } DefaultCollaborator(EntityReference user, AccessLevel access, EntityAccessHelper helper); }
DefaultCollaborator implements Collaborator { @Override public String getType() { return this.helper.getType(this.user); } DefaultCollaborator(EntityReference user, AccessLevel access, EntityAccessHelper helper); @Override String getType(); @Override boolean isUser(); @Override boolean isGroup(); @Override EntityReference getUser(); @Override String getUsername(); @Override AccessLevel getAccessLevel(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
DefaultCollaborator implements Collaborator { @Override public String getType() { return this.helper.getType(this.user); } DefaultCollaborator(EntityReference user, AccessLevel access, EntityAccessHelper helper); @Override String getType(); @Override boolean isUser(); @Override boolean isGroup(); @Override EntityReference getUser(); @Override String getUsername(); @Override AccessLevel getAccessLevel(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }