@Test public void testAuthorship() throws Exception { Authorship auth = new Authorship(); assertNull(auth.toString()); auth.setAuthors(Lists.newArrayList("L.")); assertEquals("L.", auth.toString()); auth.getAuthors().add("Rohe"); assertEquals("L. & Rohe", auth.toString()); auth.getAuthors().clear(); auth.setYear("1878"); assertEquals("1878", auth.toString()); auth.getAuthors().add("L."); auth.getAuthors().add("Rohe"); assertEquals("L. & Rohe, 1878", auth.toString()); auth.setExAuthors(Lists.newArrayList("Bassier")); assertEquals("Bassier ex L. & Rohe, 1878", auth.toString()); }
public Authorship() { }
Authorship { public Authorship() { } }
Authorship { public Authorship() { } Authorship();  Authorship(List<String> authors);  Authorship(List<String> authors, String year);  Authorship(List<String> authors, List<String> exAuthors, String year); }
Authorship { public Authorship() { } Authorship();  Authorship(List<String> authors);  Authorship(List<String> authors, String year);  Authorship(List<String> authors, List<String> exAuthors, String year); static Authorship authors(String... authors); static Authorship yearAuthors(String year, String... authors); boolean hasAuthors(); List<String> getAuthors(); void addAuthor(String author); void setAuthors(List<String> authors); boolean hasExAuthors(); List<String> getExAuthors(); void addExAuthor(String author); void setExAuthors(List<String> exAuthors); String getYear(); void setYear(String year); boolean isEmpty(); boolean exists(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Authorship { public Authorship() { } Authorship();  Authorship(List<String> authors);  Authorship(List<String> authors, String year);  Authorship(List<String> authors, List<String> exAuthors, String year); static Authorship authors(String... authors); static Authorship yearAuthors(String year, String... authors); boolean hasAuthors(); List<String> getAuthors(); void addAuthor(String author); void setAuthors(List<String> authors); boolean hasExAuthors(); List<String> getExAuthors(); void addExAuthor(String author); void setExAuthors(List<String> exAuthors); String getYear(); void setYear(String year); boolean isEmpty(); boolean exists(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }