BaseDocumentation implements Comparable<BaseDocumentation> { public String joinDescriptionText(String between) { if(this.description != null) { return this.description.joinText(between); } return ""; } BaseDocumentation();  BaseDocumentation(String id, Description description); boolean isDocumented(); boolean hasText(); String getId(); Description getDescription(); void setId(String id); void setDescription(Description description); String summarize(int length); String joinDescriptionText(String between); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(BaseDocumentation o);  }
@Test public void testJoinDescriptionText() { Description description = new Description("xxx"); BaseDocumentation fd = new BaseDocumentation(); assertTrue(fd.joinDescriptionText(", ").isEmpty()); fd.setDescription(description); assertEquals(description.joinText(" "), fd.joinDescriptionText(" ")); }