@Test public void testDoFormatScheduleAdded() { verify(LocalSchedulerTransactionLogger.doFormat(new ScheduleAddedEvent(REFERENCE_SCHEDULE))); }
@VisibleForTesting static String doFormat(LocalSchedulerEvent event) { if (event instanceof ScheduleAddedEvent) { return logScheduleAddedEvent((ScheduleAddedEvent) event); } else if (event instanceof ScheduleRemovedEvent) { return logScheduleRemovedEvent((ScheduleRemovedEvent) event); } if (event instanceof ScheduleUpdateEvent) { return logScheduleUpdateEvent((ScheduleUpdateEvent) event); } return "Unknown event type: " + event.getClass(); }
LocalSchedulerTransactionLogger { @VisibleForTesting static String doFormat(LocalSchedulerEvent event) { if (event instanceof ScheduleAddedEvent) { return logScheduleAddedEvent((ScheduleAddedEvent) event); } else if (event instanceof ScheduleRemovedEvent) { return logScheduleRemovedEvent((ScheduleRemovedEvent) event); } if (event instanceof ScheduleUpdateEvent) { return logScheduleUpdateEvent((ScheduleUpdateEvent) event); } return "Unknown event type: " + event.getClass(); } }
LocalSchedulerTransactionLogger { @VisibleForTesting static String doFormat(LocalSchedulerEvent event) { if (event instanceof ScheduleAddedEvent) { return logScheduleAddedEvent((ScheduleAddedEvent) event); } else if (event instanceof ScheduleRemovedEvent) { return logScheduleRemovedEvent((ScheduleRemovedEvent) event); } if (event instanceof ScheduleUpdateEvent) { return logScheduleUpdateEvent((ScheduleUpdateEvent) event); } return "Unknown event type: " + event.getClass(); }  }
LocalSchedulerTransactionLogger { @VisibleForTesting static String doFormat(LocalSchedulerEvent event) { if (event instanceof ScheduleAddedEvent) { return logScheduleAddedEvent((ScheduleAddedEvent) event); } else if (event instanceof ScheduleRemovedEvent) { return logScheduleRemovedEvent((ScheduleRemovedEvent) event); } if (event instanceof ScheduleUpdateEvent) { return logScheduleUpdateEvent((ScheduleUpdateEvent) event); } return "Unknown event type: " + event.getClass(); }   }
LocalSchedulerTransactionLogger { @VisibleForTesting static String doFormat(LocalSchedulerEvent event) { if (event instanceof ScheduleAddedEvent) { return logScheduleAddedEvent((ScheduleAddedEvent) event); } else if (event instanceof ScheduleRemovedEvent) { return logScheduleRemovedEvent((ScheduleRemovedEvent) event); } if (event instanceof ScheduleUpdateEvent) { return logScheduleUpdateEvent((ScheduleUpdateEvent) event); } return "Unknown event type: " + event.getClass(); }    }