### Question:
ConfigureForDosVisitor implements AllModemVisitor { public void visit(Hayes hayes) { LOGGER.info(hayes + " used with Dos configurator."); }  void visit(Hayes hayes); void visit(Zoom zoom);  }### Answer:
@Test public void testVisitForZoom() { ConfigureForDosVisitor conDos = new ConfigureForDosVisitor(); Zoom zoom = new Zoom(); conDos.visit(zoom); assertThat(logger.getLoggingEvents()).extracting("level", "message").contains( tuple(INFO, zoom + " used with Dos configurator.")); }
@Test public void testVisitForHayes() { ConfigureForDosVisitor conDos = new ConfigureForDosVisitor(); Hayes hayes = new Hayes(); conDos.visit(hayes); assertThat(logger.getLoggingEvents()).extracting("level", "message").contains( tuple(INFO, hayes + " used with Dos configurator.")); }