@Test public void statJson() throws Exception { IOTaskResult result = new IOTaskResult(); result.addPoint(new IOTaskResult.Point(IOTaskResult.IOMode.READ, 1L, 200 * 1024 * 1024)); result.addPoint(new IOTaskResult.Point(IOTaskResult.IOMode.READ, 1L, 196 * 1024 * 1024)); IOTaskSummary summary = new IOTaskSummary(result); IOTaskSummary.SpeedStat stat = summary.getReadSpeedStat(); ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(stat); IOTaskSummary.SpeedStat other = mapper.readValue(json, IOTaskSummary.SpeedStat.class); checkEquality(stat, other); }
public SpeedStat getReadSpeedStat() { return mReadSpeedStat; }
IOTaskSummary implements Summary { public SpeedStat getReadSpeedStat() { return mReadSpeedStat; } }
IOTaskSummary implements Summary { public SpeedStat getReadSpeedStat() { return mReadSpeedStat; } @JsonCreator  IOTaskSummary();  IOTaskSummary(IOTaskResult result); }
IOTaskSummary implements Summary { public SpeedStat getReadSpeedStat() { return mReadSpeedStat; } @JsonCreator  IOTaskSummary();  IOTaskSummary(IOTaskResult result); List<IOTaskResult.Point> getPoints(); void setPoints(List<IOTaskResult.Point> points); List<String> getErrors(); void setErrors(List<String> errors); BaseParameters getBaseParameters(); void setBaseParameters(BaseParameters baseParameters); UfsIOParameters getParameters(); void setParameters(UfsIOParameters parameters); SpeedStat getReadSpeedStat(); void setReadSpeedStat(SpeedStat stat); SpeedStat getWriteSpeedStat(); void setWriteSpeedStat(SpeedStat stat); @Override GraphGenerator graphGenerator(); @Override String toString(); }
IOTaskSummary implements Summary { public SpeedStat getReadSpeedStat() { return mReadSpeedStat; } @JsonCreator  IOTaskSummary();  IOTaskSummary(IOTaskResult result); List<IOTaskResult.Point> getPoints(); void setPoints(List<IOTaskResult.Point> points); List<String> getErrors(); void setErrors(List<String> errors); BaseParameters getBaseParameters(); void setBaseParameters(BaseParameters baseParameters); UfsIOParameters getParameters(); void setParameters(UfsIOParameters parameters); SpeedStat getReadSpeedStat(); void setReadSpeedStat(SpeedStat stat); SpeedStat getWriteSpeedStat(); void setWriteSpeedStat(SpeedStat stat); @Override GraphGenerator graphGenerator(); @Override String toString();  }