MultipleTrackerAdapter implements TrackerAdapter { @Override public void logEvent(Map<String, Object> eventData) { for (TrackerAdapter tracker : this.trackers) { tracker.logEvent(eventData); } } MultipleTrackerAdapter(); void addTracker(TrackerAdapter tracker); @Override void logPageView(String name); @Override void logEvent(Map<String, Object> eventData); @Override void setUserProperty(String key, Object value); @Override void logException(Throwable e);  }
@Test public void logEvent() throws Exception { Map<String, Object> event = new EventBuilder("event name").setAction("event action").get(); this.subject.logEvent(event); verify(this.tracker1).logEvent(event); verify(this.tracker2).logEvent(event); }