@Test void isGlobalWhenFalse() { DocumentReference documentReference = new DocumentReference("wiki", "space", "page"); EntityReferenceProvider entityReferenceProvider = mock(EntityReferenceProvider.class); when(entityReferenceProvider.getDefaultReference(EntityType.WIKI)).thenReturn(new WikiReference("mainwiki")); DocumentUserReference userReference = new DocumentUserReference(documentReference, entityReferenceProvider); assertFalse(userReference.isGlobal()); }
@Override public boolean isGlobal() { return this.entityReferenceProvider.getDefaultReference(EntityType.WIKI).equals( getReference().getWikiReference()); }
DocumentUserReference implements UserReference { @Override public boolean isGlobal() { return this.entityReferenceProvider.getDefaultReference(EntityType.WIKI).equals( getReference().getWikiReference()); } }
DocumentUserReference implements UserReference { @Override public boolean isGlobal() { return this.entityReferenceProvider.getDefaultReference(EntityType.WIKI).equals( getReference().getWikiReference()); } DocumentUserReference(DocumentReference reference, EntityReferenceProvider entityReferenceProvider); }
DocumentUserReference implements UserReference { @Override public boolean isGlobal() { return this.entityReferenceProvider.getDefaultReference(EntityType.WIKI).equals( getReference().getWikiReference()); } DocumentUserReference(DocumentReference reference, EntityReferenceProvider entityReferenceProvider); DocumentReference getReference(); @Override boolean isGlobal(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); }
DocumentUserReference implements UserReference { @Override public boolean isGlobal() { return this.entityReferenceProvider.getDefaultReference(EntityType.WIKI).equals( getReference().getWikiReference()); } DocumentUserReference(DocumentReference reference, EntityReferenceProvider entityReferenceProvider); DocumentReference getReference(); @Override boolean isGlobal(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }