### Question:
FirebaseDynamicLinksImpl extends FirebaseDynamicLinks { public Task<ShortDynamicLink> createShortDynamicLink(final Bundle builderParameters) { verifyDomainUriPrefix(builderParameters); return googleApi.doWrite(new CreateShortDynamicLinkImpl(builderParameters)); } FirebaseDynamicLinksImpl(FirebaseApp firebaseApp, @Nullable AnalyticsConnector analytics); @VisibleForTesting  FirebaseDynamicLinksImpl(
      GoogleApi<NoOptions> googleApi, @Nullable AnalyticsConnector analytics); PendingDynamicLinkData getPendingDynamicLinkData(@NonNull Intent intent); @Override Task<PendingDynamicLinkData> getDynamicLink(@NonNull final Intent intent); @Override Task<PendingDynamicLinkData> getDynamicLink(@NonNull final Uri dynamicLinkUri); @Override DynamicLink.Builder createDynamicLink(); static Uri createDynamicLink(Bundle builderParameters); Task<ShortDynamicLink> createShortDynamicLink(final Bundle builderParameters); static void verifyDomainUriPrefix(Bundle builderParameters); static final String KEY_SCION_DATA; static final String EXTRA_DYNAMIC_LINK_DATA; }### Answer:
@Test public void testCreateShortDynamicLink() { api.createShortDynamicLink(createDynamicLinkBundle()); verify(mockGoogleApi).doWrite(any(CreateShortDynamicLinkImpl.class)); }
@Test public void testCreateShortDynamicLink_doExecute() { Bundle bundle = createDynamicLinkBundle(); final FirebaseDynamicLinksImpl.CreateShortDynamicLinkImpl createShortDynamicLink = new FirebaseDynamicLinksImpl.CreateShortDynamicLinkImpl(bundle); try { createShortDynamicLink.doExecute(mockDynamicLinksClient, mockShortFDLCompletionSource); ArgumentCaptor<IDynamicLinksCallbacks.Stub> captorCallbacks = ArgumentCaptor.forClass(IDynamicLinksCallbacks.Stub.class); verify(mockDynamicLinksClient).createShortDynamicLink(captorCallbacks.capture(), eq(bundle)); captorCallbacks.getValue().onCreateShortDynamicLink(Status.RESULT_SUCCESS, null); } catch (RemoteException e) { fail("Unexpected Remote Exception"); } }