BaseDocumentation implements Comparable<BaseDocumentation> { public boolean hasText() { return this.description != null && this.description.hasText(); } 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 testHasText() { BaseDocumentation bd = new BaseDocumentation(); assertFalse(bd.hasText()); Description desc = new Description("xx"); assertTrue(desc.hasText()); bd.setDescription(desc); assertTrue(bd.hasText()); }