/** * Send an exception event out for aggregation/analysis * * @param description API limited to 100 characters, truncated here to 100 if needed * @param fatal whether it was fatal or not */ @SuppressWarnings("WeakerAccess") public static void sendAnalyticsException(@NonNull String description, boolean fatal) { Timber.d("sendAnalyticsException() description/fatal: %s/%s", description, fatal); if (!sOptIn) { return; } sAnalytics.exception().exceptionDescription(description).exceptionFatal(fatal).sendAsync(); } }
Mockito.verify(mAnalytics).exception(); Mockito.verify(spyHit).exceptionDescription(ArgumentMatchers.anyString()); Mockito.verify(spyHit).sendAsync(); Assert.assertEquals(spyHit.exceptionDescription(), "child exception toString()");