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