DocumentEntry extends XDSMetaClass implements Serializable { public Author getAuthor() { return authors.isEmpty() ? null : authors.get(0); }  void setAuthor(Author author); Author getAuthor();  }
@Test public void testGetAuthorOnEmptyAuthorList() { assertEquals(null, docEntry.getAuthor()); }
@Test public void testGetAuthorOnAuthorListContainingMultipleAuthors() { docEntry.getAuthors().add(author1); docEntry.getAuthors().add(author2); assertEquals(author1, docEntry.getAuthor()); }