Description { public List<Paragraph> getParagraphs() { return paragraphs; } Description();  Description(String text);  Description(List<Paragraph> paragraphs); boolean hasText(); String summarize(int length); String joinText(String between); List<Paragraph> getParagraphs(); void setParagraphs(List<Paragraph> paragraphs); @Override String toString(); String toHtml();  }
@Test public void testNoArgConstructor() { Description desc = new Description(); assertNotNull(desc.getParagraphs()); assertTrue(desc.getParagraphs().isEmpty()); }
@Test public void testStringConstructor() { String txt = "Pass the beans"; Description desc = new Description(txt); assertNotNull(desc.getParagraphs()); assertTrue(desc.getParagraphs().size()==1); assertEquals(txt, desc.getParagraphs().get(0).getText()); }
@Test public void testListOfParagraphsConstructor() { Description desc = new Description(paragraphs); assertSame(this.paragraphs,desc.getParagraphs()); }