@Test public void testDispatchNullIntent() { DeepLinkEntry entry = deepLinkEntry("airbnb: TestDeepLinkDelegate testDelegate = getOneRegistryTestDelegate(Arrays.asList(new DeepLinkEntry[]{entry}), null); Activity activity = mock(Activity.class); when(activity.getIntent()) .thenReturn(null); String message = null; try { testDelegate.dispatchFrom(activity); } catch (NullPointerException e) { message = e.getMessage(); } assertThat(message).isEqualTo("sourceIntent == null"); }
public DeepLinkResult dispatchFrom(Activity activity) { validateInput(activity); return dispatchFrom(activity, activity.getIntent()); }
BaseDeepLinkDelegate { public DeepLinkResult dispatchFrom(Activity activity) { validateInput(activity); return dispatchFrom(activity, activity.getIntent()); } }
BaseDeepLinkDelegate { public DeepLinkResult dispatchFrom(Activity activity) { validateInput(activity); return dispatchFrom(activity, activity.getIntent()); } BaseDeepLinkDelegate(List<? extends BaseRegistry> registries);  BaseDeepLinkDelegate(List<? extends BaseRegistry> registries, ErrorHandler errorHandler);  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements
  );  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements,
    ErrorHandler errorHandler
  ); }
BaseDeepLinkDelegate { public DeepLinkResult dispatchFrom(Activity activity) { validateInput(activity); return dispatchFrom(activity, activity.getIntent()); } BaseDeepLinkDelegate(List<? extends BaseRegistry> registries);  BaseDeepLinkDelegate(List<? extends BaseRegistry> registries, ErrorHandler errorHandler);  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements
  );  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements,
    ErrorHandler errorHandler
  ); List<? extends BaseRegistry> getRegistries(); DeepLinkResult dispatchFrom(Activity activity); DeepLinkResult dispatchFrom(Activity activity, Intent sourceIntent); @NonNull DeepLinkResult createResult(
    Activity activity, Intent sourceIntent, DeepLinkEntry deepLinkEntry
  ); boolean supportsUri(String uriString); }
BaseDeepLinkDelegate { public DeepLinkResult dispatchFrom(Activity activity) { validateInput(activity); return dispatchFrom(activity, activity.getIntent()); } BaseDeepLinkDelegate(List<? extends BaseRegistry> registries);  BaseDeepLinkDelegate(List<? extends BaseRegistry> registries, ErrorHandler errorHandler);  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements
  );  BaseDeepLinkDelegate(
    List<? extends BaseRegistry> registries,
    Map<String, String> configurablePathSegmentReplacements,
    ErrorHandler errorHandler
  ); List<? extends BaseRegistry> getRegistries(); DeepLinkResult dispatchFrom(Activity activity); DeepLinkResult dispatchFrom(Activity activity, Intent sourceIntent); @NonNull DeepLinkResult createResult(
    Activity activity, Intent sourceIntent, DeepLinkEntry deepLinkEntry
  ); boolean supportsUri(String uriString);  }