### Question:
Analytics implements AnalyticsDistribution { @Override public void logEvent(String name, Map<String, String> params) { Bundle bundle = null; if (params != null) { bundle = new Bundle(); for (String key : params.keySet()) { String value = params.get(key); if (TextUtils.isDigitsOnly(value)) { BundleHelper.putNumberParam(bundle, key, value); } else { bundle.putString(key, value); } } } FirebaseAnalytics.getInstance((AndroidApplication) Gdx.app).logEvent(name, bundle); }  @Override void logEvent(String name, Map<String, String> params); @Override void setScreen(final String name, final Class<?> screenClass); @Override void setUserProperty(String name, String value); @Override void setUserId(String id);  }### Answer:
@Test public void logEvent() { Analytics analytics = new Analytics(); analytics.logEvent("test", new HashMap<String, String>()); PowerMockito.verifyStatic(FirebaseAnalytics.class, VerificationModeFactory.times(1)); FirebaseAnalytics.getInstance((Context) Gdx.app); Mockito.verify(firebaseAnalytics, VerificationModeFactory.times(1)).logEvent(Mockito.eq("test"), Mockito.any(Bundle.class)); Mockito.verifyNoMoreInteractions(firebaseAnalytics); }
@Test public void logEvent_withParams() { Analytics analytics = new Analytics(); Map<String, String> params = new HashMap<>(); params.put("param_string", "lorem ipsum"); params.put("param_string_starting_with_number", "12:00 hour"); params.put("param_number_int", "15"); params.put("param_number_float", "15.54"); analytics.logEvent("test", params); PowerMockito.verifyStatic(FirebaseAnalytics.class, VerificationModeFactory.times(1)); FirebaseAnalytics.getInstance((Context) Gdx.app); Mockito.verify(firebaseAnalytics, VerificationModeFactory.times(1)).logEvent(Mockito.eq("test"), Mockito.any(Bundle.class)); Mockito.verifyNoMoreInteractions(firebaseAnalytics); }