@Test public void writeAndReadFromParcel() { Parcel parcel = Parcel.obtain(); message.writeToParcel(parcel, 0); parcel.setDataPosition(0); VehicleMessage createdFromParcel = VehicleMessage.CREATOR.createFromParcel(parcel); assertThat(createdFromParcel, instanceOf(EventedSimpleVehicleMessage.class)); assertEquals(message, createdFromParcel); }
@Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getEvent()); }
EventedSimpleVehicleMessage extends SimpleVehicleMessage { @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getEvent()); } }
EventedSimpleVehicleMessage extends SimpleVehicleMessage { @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getEvent()); } EventedSimpleVehicleMessage(Long timestamp, String name, Object value,
            Object event);  EventedSimpleVehicleMessage(String name, Object value, Object event); protected  EventedSimpleVehicleMessage(Parcel in); protected  EventedSimpleVehicleMessage(); }
EventedSimpleVehicleMessage extends SimpleVehicleMessage { @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getEvent()); } EventedSimpleVehicleMessage(Long timestamp, String name, Object value,
            Object event);  EventedSimpleVehicleMessage(String name, Object value, Object event); protected  EventedSimpleVehicleMessage(Parcel in); protected  EventedSimpleVehicleMessage(); Object getEvent(); Number getEventAsNumber(); String getEventAsString(); Boolean getEventAsBoolean(); static boolean containsRequiredFields(Set<String> fields); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in); }
EventedSimpleVehicleMessage extends SimpleVehicleMessage { @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getEvent()); } EventedSimpleVehicleMessage(Long timestamp, String name, Object value,
            Object event);  EventedSimpleVehicleMessage(String name, Object value, Object event); protected  EventedSimpleVehicleMessage(Parcel in); protected  EventedSimpleVehicleMessage(); Object getEvent(); Number getEventAsNumber(); String getEventAsString(); Boolean getEventAsBoolean(); static boolean containsRequiredFields(Set<String> fields); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in);  }