@Test public void isGroup() throws ComponentLookupException { Collaborator c = new DefaultCollaborator(COLLABORATOR, this.access, this.helper); Mockito.when(this.helper.getType(COLLABORATOR)).thenReturn("unknown", "user", "group", null); Assert.assertFalse(c.isGroup()); Assert.assertFalse(c.isGroup()); Assert.assertTrue(c.isGroup()); Assert.assertFalse(c.isGroup()); }
@Override public boolean isGroup() { return "group".equals(getType()); }
DefaultCollaborator implements Collaborator { @Override public boolean isGroup() { return "group".equals(getType()); } }
DefaultCollaborator implements Collaborator { @Override public boolean isGroup() { return "group".equals(getType()); } DefaultCollaborator(EntityReference user, AccessLevel access, EntityAccessHelper helper); }
DefaultCollaborator implements Collaborator { @Override public boolean isGroup() { return "group".equals(getType()); } 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 boolean isGroup() { return "group".equals(getType()); } 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();  }