### Question:
SliceManager { public abstract @Nullable Uri mapIntentToUri(@NonNull Intent intent); @RestrictTo(RestrictTo.Scope.LIBRARY)  SliceManager(); @SuppressWarnings("NewApi") static @NonNull SliceManager getInstance(@NonNull Context context); abstract void registerSliceCallback(@NonNull Uri uri, @NonNull SliceCallback callback); abstract void registerSliceCallback(@NonNull Uri uri, @NonNull Executor executor,
            @NonNull SliceCallback callback); abstract void unregisterSliceCallback(@NonNull Uri uri, @NonNull SliceCallback callback); abstract void pinSlice(@NonNull Uri uri); abstract void unpinSlice(@NonNull Uri uri); abstract @NonNull Set<SliceSpec> getPinnedSpecs(@NonNull Uri uri); abstract @Nullable Slice bindSlice(@NonNull Uri uri); abstract @Nullable Slice bindSlice(@NonNull Intent intent); abstract @Nullable Uri mapIntentToUri(@NonNull Intent intent); @PermissionChecker.PermissionResult abstract int checkSlicePermission(@NonNull Uri uri, int pid, int uid); abstract void grantSlicePermission(@NonNull String toPackage, @NonNull Uri uri); abstract void revokeSlicePermission(@NonNull String toPackage, @NonNull Uri uri); abstract @NonNull Collection<Uri> getSliceDescendants(@NonNull Uri uri); abstract @NonNull List<Uri> getPinnedSlices();  }### Answer:
@Test public void testMapIntentToUriStatic() { Uri expected = Uri.parse("content: Uri uri = mManager.mapIntentToUri(new Intent(mContext, SliceRenderActivity.class)); assertEquals(expected, uri); }
@Test public void testMapIntentToUri() { Uri expected = Uri.parse("content: Intent intent = new Intent("androidx.slice.action.TEST") .setPackage(mContext.getPackageName()); when(mSliceProvider.onMapIntentToUri(eq(intent))).thenReturn(expected); Uri uri = mManager.mapIntentToUri(intent); verify(mSliceProvider).onMapIntentToUri(eq(intent)); assertEquals(expected, uri); }