DetailedBolusInfo { @Override public String toString() { return new Date(date).toLocaleString() + " date: " + date + " insulin: " + insulin + " carbs: " + carbs + " isValid: " + isValid + " carbTime: " + carbTime + " isSMB: " + isSMB + " deliverAt: " + new Date(deliverAt).toLocaleString(); }  DetailedBolusInfo copy(); @Override String toString(); public long date; public long lastKnownBolusTime; public String eventType; public double insulin; public double carbs; public int source; public boolean isValid; public double glucose; public String glucoseType; public int carbTime; public JSONObject boluscalc; public Context context; public long pumpId; public boolean isSMB; public long deliverAt; public String notes; }
@Test public void toStringShouldBeOverloaded() { DetailedBolusInfo detailedBolusInfo = new DetailedBolusInfo(); Assert.assertEquals(true, detailedBolusInfo.toString().contains("insulin")); }