AnalyticsTransmissionTarget { public synchronized AnalyticsTransmissionTarget getTransmissionTarget(String transmissionTargetToken) { AnalyticsTransmissionTarget childTarget = mChildrenTargets.get(transmissionTargetToken); if (childTarget == null) { childTarget = new AnalyticsTransmissionTarget(transmissionTargetToken, this); mChildrenTargets.put(transmissionTargetToken, childTarget); final AnalyticsTransmissionTarget finalChildTarget = childTarget; Analytics.getInstance().postCommandEvenIfDisabled(new Runnable() { @Override public void run() { finalChildTarget.initInBackground(mContext, mChannel); } }); } return childTarget; } AnalyticsTransmissionTarget(@NonNull String transmissionTargetToken, final AnalyticsTransmissionTarget parentTarget); static synchronized void addAuthenticationProvider(final AuthenticationProvider authenticationProvider); void trackEvent(String name); void trackEvent(String name, Map<String, String> properties); void trackEvent(String name, Map<String, String> properties, int flags); void trackEvent(String name, EventProperties properties); void trackEvent(String name, EventProperties properties, int flags); synchronized AnalyticsTransmissionTarget getTransmissionTarget(String transmissionTargetToken); AppCenterFuture<Boolean> isEnabledAsync(); AppCenterFuture<Void> setEnabledAsync(final boolean enabled); void pause(); void resume(); PropertyConfigurator getPropertyConfigurator();  }
@Test public void testGetTransmissionTarget() { assertNotNull(Analytics.getTransmissionTarget("token")); }
@Test public void testGetTransmissionTargetWithNullToken() { mockStatic(AppCenterLog.class); assertNull(Analytics.getTransmissionTarget(null)); verifyStatic(); AppCenterLog.error(anyString(), contains("Transmission target token may not be null or empty.")); }
@Test public void testGetTransmissionTargetWithEmptyToken() { mockStatic(AppCenterLog.class); assertNull(Analytics.getTransmissionTarget("")); verifyStatic(); AppCenterLog.error(anyString(), contains("Transmission target token may not be null or empty.")); }