### Question:
Body2004 implements IBody { public void addEle(IElement e) { this.txt.append("\n" + e.getContent()); }  void addEle(IElement e); void addEle(String str); String getContent(); IHeader getHeader(); IFooter getFooter();  }### Answer:
@Test public void testAddEle(){ Body2004 bd = new Body2004(); bd.addEle(new IElement() { @Override public String getContent() { return "I am an element"; } }); assertEquals(2, TestUtils.regexCount(bd.getContent(), "<*w:body>")); assertEquals(1, TestUtils.regexCount(bd.getContent(), "I am an element")); }