@Test
public void testParcelable() {

  Format format1 = Format.createSampleFormat("1", MimeTypes.VIDEO_H264, 0);
  Format format2 = Format.createSampleFormat("2", MimeTypes.AUDIO_AAC, 0);
  Format format3 = Format.createSampleFormat("3", MimeTypes.VIDEO_H264, 0);
  TrackGroup trackGroup1 = new TrackGroup(format1, format2);
  TrackGroup trackGroup2 = new TrackGroup(format3);
  TrackGroupArray trackGroupArrayToParcel = new TrackGroupArray(trackGroup1, trackGroup2);
  Parcel parcel = Parcel.obtain();
  trackGroupArrayToParcel.writeToParcel(parcel, 0);
  parcel.setDataPosition(0);
  TrackGroupArray trackGroupArrayFromParcel = TrackGroupArray.CREATOR.createFromParcel(parcel);
  assertThat(trackGroupArrayFromParcel).isEqualTo(trackGroupArrayToParcel);
  parcel.recycle();
}