} catch (CmdLineActionException ignore) {
}
}
public void testDataFlow() throws CmdLineActionException {
ActionMessagePrinter printer = new ActionMessagePrinter();
MockGetNextPageCliAction cliAction = new MockGetNextPageCliAction();
cliAction.setProductTypeName(PRODUCT_TYPE_NAME);
cliAction.setCurrentPageNum(PAGE_NUM);
cliAction.execute(printer);
assertEquals(6, printer.getPrintedMessages().size());
assertEquals("Page: [num=" + (PAGE_NUM + 1) + ", totalPages="
+ TOTAL_PAGES + ", pageSize=" + PAGE_SIZE + "]", printer
.getPrintedMessages().get(0));
assertEquals("\n", printer.getPrintedMessages().get(1));
assertEquals("Products:", printer.getPrintedMessages().get(2));
assertEquals("\n", printer.getPrintedMessages().get(3));
assertEquals("Product: [id=" + PRODUCT_ID_4 + ",name=" + PRODUCT_NAME_4
+ ",type=" + PRODUCT_TYPE_NAME + ",structure=" + PRODUCT_STRUCTURE
+ ", transferStatus=" + PRODUCT_STATUS + "]", printer
.getPrintedMessages().get(4));
assertEquals("\n", printer.getPrintedMessages().get(5));
}