### Question:
CameraPosition implements Parcelable { @Override public void writeToParcel(Parcel out, int flags) { out.writeDouble(bearing); out.writeParcelable(target, flags); out.writeDouble(tilt); out.writeDouble(zoom); if (padding != null) { int length = padding.length; out.writeInt(length); for (double v : padding) { out.writeDouble(v); } } else { out.writeInt(-1); } } @Deprecated  CameraPosition(LatLng target, double zoom, double tilt, double bearing); @Keep  CameraPosition(LatLng target, double zoom, double tilt, double bearing, double[] padding); @Override int describeContents(); @Override void writeToParcel(Parcel out, int flags); @Override String toString(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); static final CameraPosition DEFAULT; static final Parcelable.Creator<CameraPosition> CREATOR; @Keep
  final double bearing; @Keep
  final LatLng target; @Keep
  final double tilt; @Keep
  final double zoom; @Keep
  final double[] padding; }### Answer:
@Test public void testParcelable() { CameraPosition cameraPosition1 = new CameraPosition(new LatLng(1, 2), 3, 4, 5, new double[] {0, 500, 0, 0}); Parcel parcel = Parcel.obtain(); cameraPosition1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CameraPosition cameraPosition2 = CameraPosition.CREATOR.createFromParcel(parcel); assertEquals("Parcel should match original object", cameraPosition1, cameraPosition2); }
@Test public void testParcelableNulls() { CameraPosition cameraPosition1 = new CameraPosition(null, 3, 4, 5, null); Parcel parcel = Parcel.obtain(); cameraPosition1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CameraPosition cameraPosition2 = CameraPosition.CREATOR.createFromParcel(parcel); assertEquals("Parcel should match original object", cameraPosition1, cameraPosition2); }