DocumentEntry extends XDSMetaClass implements Serializable { public void setAuthor(Author author) { authors.clear(); authors.add(author); }  void setAuthor(Author author); Author getAuthor();  }
@Test public void testSetAuthorResetsAuthorList() { docEntry.getAuthors().add(author1); docEntry.getAuthors().add(author2); docEntry.setAuthor(author3); assertEquals(Collections.singletonList(author3), docEntry.getAuthors()); }