@Override
  public void startMediaRequest(
      @NonNull String[] mimeTypes, int requestId, @NonNull InsertionRequestCallback callback) {
    mCurrentRunningLocalProxy.dispose();

    mCurrentRequest = requestId;
    mCurrentCallback = callback;

    final Intent pickingIntent = getMediaInsertRequestIntent(mimeTypes, requestId);

    mContext.startActivity(pickingIntent);
  }
@Test
  public void testCorrectBroadcast() {
    mFakeUriResponse = Uri.parse("content://ask/image.png");
    mUnderTest.startMediaRequest(new String[] {"media/png"}, 123, mCallback);

    mShadowApplication.getRegisteredReceivers().stream()
        .filter(
            wrapper ->
                wrapper.broadcastReceiver
                    instanceof RemoteInsertionImpl.MediaInsertionAvailableReceiver)
        .map(ShadowApplication.Wrapper::getBroadcastReceiver)
        .findFirst()
        .get()
        .onReceive(
            ApplicationProvider.getApplicationContext(),
            createReceiverIntent(
                Uri.parse("content://example/image.png"), new String[] {"media/png"}, 123));

    Assert.assertEquals(Uri.parse("content://example/image.png"), mReceivedRemoteUri);

    ArgumentCaptor<InputContentInfoCompat> argumentCaptor =
        ArgumentCaptor.forClass(InputContentInfoCompat.class);
    Mockito.verify(mCallback).onMediaRequestDone(Mockito.eq(123), argumentCaptor.capture());
    Assert.assertEquals(mFakeUriResponse, argumentCaptor.getValue().getContentUri());
    Assert.assertEquals(1, argumentCaptor.getValue().getDescription().getMimeTypeCount());
    Assert.assertEquals("media/png", argumentCaptor.getValue().getDescription().getMimeType(0));
  }