### Question:
FirebaseDynamicLinksImpl extends FirebaseDynamicLinks { public PendingDynamicLinkData getPendingDynamicLinkData(@NonNull Intent intent) { DynamicLinkData dynamicLinkData = SafeParcelableSerializer.deserializeFromIntentExtra( intent, EXTRA_DYNAMIC_LINK_DATA, DynamicLinkData.CREATOR); return dynamicLinkData != null ? new PendingDynamicLinkData(dynamicLinkData) : null; } 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 testGetPendingDynamicLinkData() { Bundle extensions = new Bundle(); extensions.putString(PARAMETER, VALUE); DynamicLinkData dynamicLinkData = new DynamicLinkData( DYNAMIC_LINK, DEEP_LINK, MINIMUM_VERSION, CLICK_TIMESTAMP, extensions, null ); Intent intent = new Intent(); SafeParcelableSerializer.serializeToIntentExtra( dynamicLinkData, intent, EXTRA_DYNAMIC_LINK_DATA); PendingDynamicLinkData pendingDynamicLinkData = api.getPendingDynamicLinkData(intent); assertNotNull(pendingDynamicLinkData); assertEquals(Uri.parse(DEEP_LINK), pendingDynamicLinkData.getLink()); assertEquals(MINIMUM_VERSION, pendingDynamicLinkData.getMinimumAppVersion()); assertEquals(CLICK_TIMESTAMP, pendingDynamicLinkData.getClickTimestamp()); Bundle returnExtensions = pendingDynamicLinkData.getExtensions(); assertEquals(extensions.keySet(), returnExtensions.keySet()); for (String key : extensions.keySet()) { assertEquals(extensions.getString(key), returnExtensions.getString(key)); } assertNull(pendingDynamicLinkData.getRedirectUrl()); }
@Test public void testGetPendingDynamicLinkData_NoDynamicLinkData() { assertNull(api.getPendingDynamicLinkData(new Intent())); }