### Question:
AlignedTablePrinter implements OutputPrinter { @Override public void finish() throws IOException { printRows(ImmutableList.of(), true); writer.append(format("(%s row%s)%n", rowCount, (rowCount != 1) ? "s" : "")); writer.flush(); } AlignedTablePrinter(List<Column> columns, Writer writer); @Override void finish(); @Override void printRows(List<List<?>> rows, boolean complete);  }### Answer:
@Test public void testAlignedPrintingNoRows() throws Exception { List<Column> columns = ImmutableList.<Column>builder() .add(column("first", VARCHAR)) .add(column("last", VARCHAR)) .build(); StringWriter writer = new StringWriter(); OutputPrinter printer = new AlignedTablePrinter(columns, writer); printer.finish(); String expected = "" + " first | last \n" + "-------+------\n" + "(0 rows)\n"; assertEquals(writer.getBuffer().toString(), expected); }