DitoTracker implements TrackerAdapter { @Override public void logEvent(final Map<String, Object> eventData) { DitoCredentials credentials = new DitoCredentials(this.userId, null, null, null, null); if (!eventData.containsKey("data")) { eventData.put("data", new HashMap<>(eventData)); } try { DitoSDK.track(credentials, eventData, new DitoSDKCallback() { @Override public void onSuccess(String s) { } @Override public void onError(Exception e) { } }); } catch (DitoSDKException ignored) { } } DitoTracker(Map<String, Object> userProperties); @Override void logPageView(String name); @Override void logEvent(final Map<String, Object> eventData); @Override void setUserProperty(String key, Object value); @Override void logException(Throwable e);  }
@Test public void logEvent() throws Exception { this.subject.logEvent(new EventBuilder("test") .setAction("an action") .get()); verifyStatic(); DitoSDK.track(any(DitoCredentials.class), any(), any(DitoSDKCallback.class)); }