@Test public void jsonSerialization() { String value = "{\"id\":1,\"leftSpeed\":5,\"rightSpeed\":-4,\"panServoAngle\":42,\"tiltServoAngle\":10,\"lights\":true,\"takePicture\":false,\"servos\":true,\"rawValues\":false,\"timestamp\":10}"; assertThat(controlMessage.toJson(), is(value)); }
public String toJson() { return new Gson().toJson(this); }
ControlMessage { public String toJson() { return new Gson().toJson(this); } }
ControlMessage { public String toJson() { return new Gson().toJson(this); } ControlMessage(int leftSpeed, int rightSpeed,
			boolean lights, int panServoAngle, int tiltServoAngle,
			boolean takePicture, boolean servos, boolean rawValues); }
ControlMessage { public String toJson() { return new Gson().toJson(this); } ControlMessage(int leftSpeed, int rightSpeed,
			boolean lights, int panServoAngle, int tiltServoAngle,
			boolean takePicture, boolean servos, boolean rawValues); static int[] getSpeedPowerMap(); static ControlMessage fromJson(String json); byte[] toSerialMessage(); long getTimestamp(); @Override String toString(); String toJson(); int getId(); boolean isServos(); boolean isLights(); boolean isRawValues(); int getLeftSpeed(); int getRightSpeed(); int getPanServoAngle(); int getTiltServoAngle(); @Override boolean equals(Object obj); @Override int hashCode(); void setTimestamp(long timestamp); }
ControlMessage { public String toJson() { return new Gson().toJson(this); } ControlMessage(int leftSpeed, int rightSpeed,
			boolean lights, int panServoAngle, int tiltServoAngle,
			boolean takePicture, boolean servos, boolean rawValues); static int[] getSpeedPowerMap(); static ControlMessage fromJson(String json); byte[] toSerialMessage(); long getTimestamp(); @Override String toString(); String toJson(); int getId(); boolean isServos(); boolean isLights(); boolean isRawValues(); int getLeftSpeed(); int getRightSpeed(); int getPanServoAngle(); int getTiltServoAngle(); @Override boolean equals(Object obj); @Override int hashCode(); void setTimestamp(long timestamp); static final int SPEED_STEPS; }