MlltFrame extends Id3Frame { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(mpegFramesBetweenReference); dest.writeInt(bytesBetweenReference); dest.writeInt(millisecondsBetweenReference); dest.writeIntArray(bytesDeviations); dest.writeIntArray(millisecondsDeviations); } MlltFrame(
      int mpegFramesBetweenReference,
      int bytesBetweenReference,
      int millisecondsBetweenReference,
      int[] bytesDeviations,
      int[] millisecondsDeviations);   MlltFrame(Parcel in); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); static final String ID; final int mpegFramesBetweenReference; final int bytesBetweenReference; final int millisecondsBetweenReference; final int[] bytesDeviations; final int[] millisecondsDeviations; static final Creator<MlltFrame> CREATOR; }
@Test public void testParcelable() { MlltFrame mlltFrameToParcel = new MlltFrame( 1, 1, 1, new int[] {1, 2}, new int[] {1, 2}); Parcel parcel = Parcel.obtain(); mlltFrameToParcel.writeToParcel(parcel, 0); parcel.setDataPosition(0); MlltFrame mlltFrameFromParcel = MlltFrame.CREATOR.createFromParcel(parcel); assertThat(mlltFrameFromParcel).isEqualTo(mlltFrameToParcel); parcel.recycle(); }