APSResult { public APSResult clone() { APSResult newResult = new APSResult(); doClone(newResult); return newResult; } APSResult(); APSResult rate(double rate); APSResult duration(int duration); APSResult percent(int percent); APSResult tempBasalRequested(boolean tempBasalRequested); APSResult usePercent(boolean usePercent); APSResult json(JSONObject json); @Override String toString(); Spanned toSpanned(); APSResult clone(); JSONObject json(); List<BgReading> getPredictions(); long getLatestPredictionsTime(); boolean isChangeRequested(); public long date; public String reason; public double rate; public int percent; public boolean usePercent; public int duration; public boolean tempBasalRequested; public boolean bolusRequested; public IobTotal iob; public JSONObject json; public boolean hasPredictions; public double smb; public long deliverAt; public Constraint<Double> inputConstraints; public Constraint<Double> rateConstraint; public Constraint<Integer> percentConstraint; public Constraint<Double> smbConstraint; }
@Test public void cloneTest() { APSResult apsResult = new APSResult(); apsResult.rate(10); APSResult apsResult2 = apsResult.clone(); Assert.assertEquals(apsResult.rate, apsResult2.rate, 0); }