@Test public void test() { String[] args = {}; App.main(args); }
public static void main(String[] args) { PrinterController hpPrinterController = new PrinterController(new HpPrinter()); PrinterController canonPrinterController = new PrinterController(new CanonPrinter()); PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter()); hpPrinterController.print(MESSAGE_TO_PRINT); canonPrinterController.print(MESSAGE_TO_PRINT); epsonPrinterController.print(MESSAGE_TO_PRINT); }
App { public static void main(String[] args) { PrinterController hpPrinterController = new PrinterController(new HpPrinter()); PrinterController canonPrinterController = new PrinterController(new CanonPrinter()); PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter()); hpPrinterController.print(MESSAGE_TO_PRINT); canonPrinterController.print(MESSAGE_TO_PRINT); epsonPrinterController.print(MESSAGE_TO_PRINT); } }
App { public static void main(String[] args) { PrinterController hpPrinterController = new PrinterController(new HpPrinter()); PrinterController canonPrinterController = new PrinterController(new CanonPrinter()); PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter()); hpPrinterController.print(MESSAGE_TO_PRINT); canonPrinterController.print(MESSAGE_TO_PRINT); epsonPrinterController.print(MESSAGE_TO_PRINT); }  }
App { public static void main(String[] args) { PrinterController hpPrinterController = new PrinterController(new HpPrinter()); PrinterController canonPrinterController = new PrinterController(new CanonPrinter()); PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter()); hpPrinterController.print(MESSAGE_TO_PRINT); canonPrinterController.print(MESSAGE_TO_PRINT); epsonPrinterController.print(MESSAGE_TO_PRINT); }  static void main(String[] args); }
App { public static void main(String[] args) { PrinterController hpPrinterController = new PrinterController(new HpPrinter()); PrinterController canonPrinterController = new PrinterController(new CanonPrinter()); PrinterController epsonPrinterController = new PrinterController(new EpsonPrinter()); hpPrinterController.print(MESSAGE_TO_PRINT); canonPrinterController.print(MESSAGE_TO_PRINT); epsonPrinterController.print(MESSAGE_TO_PRINT); }  static void main(String[] args); static final String MESSAGE_TO_PRINT; }