### Question:
DefaultModelBridge implements ModelBridge { @Override public DocumentReference getAuthorReference(EntityReference entityReference) throws EventStreamException { return this.findDocument(entityReference).getAuthorReference(); }  @Override DocumentReference getAuthorReference(EntityReference entityReference); @Override boolean checkXObjectPresence(List<String> xObjectTypes, Object source);  }### Answer:
@Test public void testAuthorReference() throws Exception { XWikiContext context = mock(XWikiContext.class); XWiki xwiki = mock(XWiki.class); XWikiDocument document = mock(XWikiDocument.class); DocumentReference authorReference = mock(DocumentReference.class); EntityReference entityReference = mock(EntityReference.class); when(this.contextProvider.get()).thenReturn(context); when(context.getWiki()).thenReturn(xwiki); when(xwiki.getDocument(entityReference, context)).thenReturn(document); when(document.getAuthorReference()).thenReturn(authorReference); DocumentReference result = this.mocker.getComponentUnderTest().getAuthorReference(entityReference); assertEquals(authorReference, result); }