@Test public void testSerializeWithoutTimestamp() { VehicleMessage message = new SimpleVehicleMessage(messageName, value); message.untimestamp(); String serialized = new String(JsonFormatter.serialize(message)); assertFalse(serialized.contains("timestamp")); }
public static String serialize(VehicleMessage message) { return sGson.toJson(message); }
JsonFormatter { public static String serialize(VehicleMessage message) { return sGson.toJson(message); } }
JsonFormatter { public static String serialize(VehicleMessage message) { return sGson.toJson(message); }  }
JsonFormatter { public static String serialize(VehicleMessage message) { return sGson.toJson(message); }  static String serialize(VehicleMessage message); static String serialize(Collection<VehicleMessage> messages); static VehicleMessage deserialize(String data); }
JsonFormatter { public static String serialize(VehicleMessage message) { return sGson.toJson(message); }  static String serialize(VehicleMessage message); static String serialize(Collection<VehicleMessage> messages); static VehicleMessage deserialize(String data);  }