DownloadHelper { public TrackGroupArray getTrackGroups(int periodIndex) { assertPreparedWithMedia(); return trackGroupArrays[periodIndex]; } DownloadHelper(
      String downloadType,
      Uri uri,
      @Nullable String cacheKey,
      @Nullable MediaSource mediaSource,
      DefaultTrackSelector.Parameters trackSelectorParameters,
      RendererCapabilities[] rendererCapabilities); static DefaultTrackSelector.Parameters getDefaultTrackSelectorParameters(Context context); @Deprecated @SuppressWarnings("deprecation") static DownloadHelper forProgressive(Uri uri); static DownloadHelper forProgressive(Context context, Uri uri); @Deprecated static DownloadHelper forProgressive(Uri uri, @Nullable String cacheKey); static DownloadHelper forProgressive(Context context, Uri uri, @Nullable String cacheKey); @Deprecated static DownloadHelper forDash(
      Uri uri, DataSource.Factory dataSourceFactory, RenderersFactory renderersFactory); static DownloadHelper forDash(
      Context context,
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory); static DownloadHelper forDash(
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory,
      @Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
      DefaultTrackSelector.Parameters trackSelectorParameters); @Deprecated static DownloadHelper forHls(
      Uri uri, DataSource.Factory dataSourceFactory, RenderersFactory renderersFactory); static DownloadHelper forHls(
      Context context,
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory); static DownloadHelper forHls(
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory,
      @Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
      DefaultTrackSelector.Parameters trackSelectorParameters); @Deprecated static DownloadHelper forSmoothStreaming(
      Uri uri, DataSource.Factory dataSourceFactory, RenderersFactory renderersFactory); static DownloadHelper forSmoothStreaming(
      Context context,
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory); static DownloadHelper forSmoothStreaming(
      Uri uri,
      DataSource.Factory dataSourceFactory,
      RenderersFactory renderersFactory,
      @Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
      DefaultTrackSelector.Parameters trackSelectorParameters); static MediaSource createMediaSource(
      DownloadRequest downloadRequest, DataSource.Factory dataSourceFactory); static MediaSource createMediaSource(
      DownloadRequest downloadRequest,
      DataSource.Factory dataSourceFactory,
      DrmSessionManager<?> drmSessionManager); void prepare(Callback callback); void release(); @Nullable Object getManifest(); int getPeriodCount(); TrackGroupArray getTrackGroups(int periodIndex); MappedTrackInfo getMappedTrackInfo(int periodIndex); List<TrackSelection> getTrackSelections(int periodIndex, int rendererIndex); void clearTrackSelections(int periodIndex); void replaceTrackSelections(
      int periodIndex, DefaultTrackSelector.Parameters trackSelectorParameters); void addTrackSelection(
      int periodIndex, DefaultTrackSelector.Parameters trackSelectorParameters); void addAudioLanguagesToSelection(String... languages); void addTextLanguagesToSelection(
      boolean selectUndeterminedTextLanguage, String... languages); void addTrackSelectionForSingleRenderer(
      int periodIndex,
      int rendererIndex,
      DefaultTrackSelector.Parameters trackSelectorParameters,
      List<SelectionOverride> overrides); DownloadRequest getDownloadRequest(@Nullable byte[] data); DownloadRequest getDownloadRequest(String id, @Nullable byte[] data); static final Parameters DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_CONTEXT; @Deprecated
  static final Parameters DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_VIEWPORT; @Deprecated
  static final DefaultTrackSelector.Parameters DEFAULT_TRACK_SELECTOR_PARAMETERS; }
@Test public void getTrackGroups_returnsTrackGroups() throws Exception { prepareDownloadHelper(downloadHelper); TrackGroupArray trackGroupArrayPeriod0 = downloadHelper.getTrackGroups( 0); TrackGroupArray trackGroupArrayPeriod1 = downloadHelper.getTrackGroups( 1); assertThat(trackGroupArrayPeriod0).isEqualTo(trackGroupArrays[0]); assertThat(trackGroupArrayPeriod1).isEqualTo(trackGroupArrays[1]); }