TableAppender { public void appendAllAvailableRows(final XMLUtil util, final Appendable appendable) throws IOException { this.appendPreambleOnce(util, appendable); this.appendRows(util, appendable, 0); } TableAppender(final TableBuilder builder); void appendXMLToContentEntry(final XMLUtil util, final Appendable appendable); void appendPostamble(final Appendable appendable); void appendPreambleOnce(final XMLUtil util, final Appendable appendable); void appendPreamble(final XMLUtil util, final Appendable appendable); void appendAllAvailableRows(final XMLUtil util, final Appendable appendable); void appendRemainingRowsFrom(final XMLUtil util, final Appendable appendable,
                                        final int rowIndex); void appendSomeAvailableRowsFrom(final XMLUtil util, final Appendable appendable,
                                            final int rowIndex); boolean isPreambleWritten();  }
@Test public final void testName() throws IOException { final StringBuilder sb = new StringBuilder(); PowerMock.resetAll(); EasyMock.expect(this.tb.getName()).andReturn("tb"); EasyMock.expect(this.tb.getStyleName()).andReturn("tb-style"); EasyMock.expect(this.tb.getCustomValueByAttribute()).andReturn(null); EasyMock.expect(this.tb.getColumns()) .andReturn(FastFullList.<TableColumnImpl>builder().build()); EasyMock.expect(this.tb.getTableRowsUsedSize()).andReturn(0); EasyMock.expect(this.tb.getShapes()).andReturn(Collections.<Shape>emptyList()); PowerMock.replayAll(); this.tableAppender.appendAllAvailableRows(this.xmlUtil, sb); PowerMock.verifyAll(); sb.append("</table:table>"); DomTester.assertEquals("<table:table table:name=\"tb\" table:style-name=\"tb-style\" " + "table:print=\"false\"><office:forms form:automatic-focus=\"false\" " + "form:apply-design-mode=\"false\"/><table:table-column " + "table:style-name=\"co1\" " + "table:number-columns-repeated=\"1024\" " + "table:default-cell-style-name=\"Default\"/></table:table>", sb.toString()); }