Extract ConsolePrinter class and create unit test