### Question:
SliceManager { public abstract @NonNull Collection<Uri> getSliceDescendants(@NonNull Uri uri); @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 testGetDescendants() { Uri uri = new Uri.Builder() .scheme(ContentResolver.SCHEME_CONTENT) .authority(mContext.getPackageName()) .build(); Collection<Uri> collection = Arrays.asList( uri, uri.buildUpon().appendPath("1").build(), uri.buildUpon().appendPath("2").build() ); when(mSliceProvider.onGetSliceDescendants(any(Uri.class))) .thenReturn(collection); Collection<Uri> allUris = mManager.getSliceDescendants(uri); assertEquals(allUris, collection); verify(mSliceProvider).onGetSliceDescendants(eq(uri)); }