fix NPE in TempBasal treatments tab

This commit is contained in:
Milos Kozak 2018-04-09 19:52:01 +02:00
parent 132400bb9e
commit e9ac979a1b
14 changed files with 150 additions and 94 deletions

View file

@ -24,9 +24,6 @@ public class IobTotal {
// oref1
public long lastBolusTime;
public long lastTempDate;
public int lastTempDuration;
public double lastTempRate;
public IobTotal iobWithZeroTemp;
public double netInsulin = 0d; // for calculations from temp basals only
@ -76,9 +73,6 @@ public class IobTotal {
result.netInsulin = basalIob.netInsulin + bolusIOB.netInsulin;
result.extendedBolusInsulin = basalIob.extendedBolusInsulin + bolusIOB.extendedBolusInsulin;
result.lastBolusTime = bolusIOB.lastBolusTime;
result.lastTempDate = basalIob.lastTempDate;
result.lastTempRate = basalIob.lastTempRate;
result.lastTempDuration = basalIob.lastTempDuration;
result.iobWithZeroTemp = basalIob.iobWithZeroTemp;
return result;
}

View file

@ -217,7 +217,7 @@ public class TemporaryBasal implements Interval {
// -------- Interval interface end ---------
public IobTotal iobCalc(long time) {
public IobTotal iobCalc(long time, Profile profile) {
if(isFakeExtended){
log.error("iobCalc should only be called on Extended boluses separately");
@ -225,7 +225,6 @@ public class TemporaryBasal implements Interval {
}
IobTotal result = new IobTotal(time);
Profile profile = MainApp.getConfigBuilder().getProfile(time);
InsulinInterface insulinInterface = ConfigBuilderPlugin.getActiveInsulin();
int realDuration = getDurationToTime(time);

View file

@ -5,6 +5,7 @@ import java.util.List;
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.db.ExtendedBolus;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.TempTarget;
@ -24,7 +25,7 @@ public interface TreatmentsInterface {
IobTotal getLastCalculationTreatments();
IobTotal getCalculationToTimeTreatments(long time);
IobTotal getLastCalculationTempBasals();
IobTotal getCalculationToTimeTempBasals(long time);
IobTotal getCalculationToTimeTempBasals(long time, Profile profile);
MealData getMealData();

View file

@ -293,13 +293,13 @@ public class IobCobCalculatorPlugin extends PluginBase {
return getBGDataFrom;
}
public IobTotal calculateFromTreatmentsAndTempsSynchronized(long time) {
public IobTotal calculateFromTreatmentsAndTempsSynchronized(long time, Profile profile) {
synchronized (dataLock) {
return calculateFromTreatmentsAndTemps(time);
return calculateFromTreatmentsAndTemps(time, profile);
}
}
public IobTotal calculateFromTreatmentsAndTemps(long time) {
public IobTotal calculateFromTreatmentsAndTemps(long time, Profile profile) {
long now = System.currentTimeMillis();
time = roundUpTime(time);
if (time < now && iobTable.get(time) != null) {
@ -309,16 +309,16 @@ public class IobCobCalculatorPlugin extends PluginBase {
//log.debug(">>> calculateFromTreatmentsAndTemps Cache miss " + new Date(time).toLocaleString());
}
IobTotal bolusIob = TreatmentsPlugin.getPlugin().getCalculationToTimeTreatments(time).round();
IobTotal basalIob = TreatmentsPlugin.getPlugin().getCalculationToTimeTempBasals(time).round();
IobTotal basalIob = TreatmentsPlugin.getPlugin().getCalculationToTimeTempBasals(time, profile).round();
if (OpenAPSSMBPlugin.getPlugin().isEnabled(PluginType.APS)) {
// Add expected zere temp basal for next 240 mins
// Add expected zero temp basal for next 240 mins
IobTotal basalIobWithZeroTemp = basalIob.copy();
TemporaryBasal t = new TemporaryBasal()
.date(now + 60 * 1000L)
.duration(240)
.absolute(0);
if (t.date < time) {
IobTotal calc = t.iobCalc(time);
IobTotal calc = t.iobCalc(time, profile);
basalIobWithZeroTemp.plus(calc);
}
@ -426,8 +426,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
}
}
public IobTotal[] calculateIobArrayInDia() {
Profile profile = MainApp.getConfigBuilder().getProfile();
public IobTotal[] calculateIobArrayInDia(Profile profile) {
// predict IOB out to DIA plus 30m
long time = System.currentTimeMillis();
time = roundUpTime(time);
@ -436,15 +435,14 @@ public class IobCobCalculatorPlugin extends PluginBase {
int pos = 0;
for (int i = 0; i < len; i++) {
long t = time + i * 5 * 60000;
IobTotal iob = calculateFromTreatmentsAndTempsSynchronized(t);
IobTotal iob = calculateFromTreatmentsAndTempsSynchronized(t, profile);
array[pos] = iob;
pos++;
}
return array;
}
public IobTotal[] calculateIobArrayForSMB() {
Profile profile = MainApp.getConfigBuilder().getProfile();
public IobTotal[] calculateIobArrayForSMB(Profile profile) {
// predict IOB out to DIA plus 30m
long time = System.currentTimeMillis();
time = roundUpTime(time);
@ -453,7 +451,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
int pos = 0;
for (int i = 0; i < len; i++) {
long t = time + i * 5 * 60000;
IobTotal iob = calculateFromTreatmentsAndTempsSynchronized(t);
IobTotal iob = calculateFromTreatmentsAndTempsSynchronized(t, profile);
array[pos] = iob;
pos++;
}
@ -479,6 +477,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
}
@Subscribe
@SuppressWarnings("unused")
public void onEventAppInitialized(EventAppInitialized ev) {
if (this != getPlugin()) {
log.debug("Ignoring event for non default instance");
@ -488,6 +487,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
}
@Subscribe
@SuppressWarnings("unused")
public void onEventNewBG(EventNewBG ev) {
if (this != getPlugin()) {
log.debug("Ignoring event for non default instance");

View file

@ -138,7 +138,7 @@ public class IobCobThread extends Thread {
delta = (bg - bucketed_data.get(i + 1).value);
avgDelta = (bg - bucketed_data.get(i + 3).value) / 3;
IobTotal iob = iobCobCalculatorPlugin.calculateFromTreatmentsAndTemps(bgTime);
IobTotal iob = iobCobCalculatorPlugin.calculateFromTreatmentsAndTemps(bgTime, profile);
double bgi = -iob.activity * sens * 5;
double deviation = delta - bgi;

View file

@ -136,7 +136,7 @@ public class OpenAPSAMAPlugin extends PluginBase implements APSInterface {
Date start = new Date();
Date startPart = new Date();
IobTotal[] iobArray = IobCobCalculatorPlugin.getPlugin().calculateIobArrayInDia();
IobTotal[] iobArray = IobCobCalculatorPlugin.getPlugin().calculateIobArrayInDia(profile);
Profiler.log(log, "calculateIobArrayInDia()", startPart);
startPart = new Date();

View file

@ -143,7 +143,7 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
Date start = new Date();
Date startPart = new Date();
IobTotal[] iobArray = IobCobCalculatorPlugin.getPlugin().calculateIobArrayForSMB();
IobTotal[] iobArray = IobCobCalculatorPlugin.getPlugin().calculateIobArrayForSMB(profile);
Profiler.log(log, "calculateIobArrayInDia()", startPart);
startPart = new Date();

View file

@ -23,7 +23,6 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.ExtendedBolus;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.IobCobCalculator.BasalData;
@ -38,6 +37,7 @@ import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLab
import info.nightscout.androidaps.plugins.Overview.graphExtensions.Scale;
import info.nightscout.androidaps.plugins.Overview.graphExtensions.ScaledDataPoint;
import info.nightscout.androidaps.plugins.Overview.graphExtensions.TimeAsXAxisLabelFormatter;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.utils.Round;
@ -334,7 +334,10 @@ public class GraphData {
Scale iobScale = new Scale();
for (long time = fromTime; time <= toTime; time += 5 * 60 * 1000L) {
double iob = IobCobCalculatorPlugin.getPlugin().calculateFromTreatmentsAndTempsSynchronized(time).iob;
Profile profile = MainApp.getConfigBuilder().getProfile(time);
double iob = 0d;
if (profile != null)
iob = IobCobCalculatorPlugin.getPlugin().calculateFromTreatmentsAndTempsSynchronized(time, profile).iob;
if (Math.abs(lastIob - iob) > 0.02) {
if (Math.abs(lastIob - iob) > 0.2)
iobArray.add(new ScaledDataPoint(time, lastIob, iobScale));

View file

@ -40,6 +40,7 @@ import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.NSUpload;
import info.nightscout.utils.SP;
import info.nightscout.utils.T;
@ -320,22 +321,15 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
@Override
public IobTotal getCalculationToTimeTempBasals(long time) {
public IobTotal getCalculationToTimeTempBasals(long time, Profile profile) {
IobTotal total = new IobTotal(time);
synchronized (tempBasals) {
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
TemporaryBasal t = tempBasals.get(pos);
if (t.date > time) continue;
IobTotal calc = t.iobCalc(time);
IobTotal calc = t.iobCalc(time, profile);
//log.debug("BasalIOB " + new Date(time) + " >>> " + calc.basaliob);
total.plus(calc);
if (!t.isEndingEvent()) {
total.lastTempDate = t.date;
total.lastTempDuration = t.durationInMinutes;
Profile profile = MainApp.getConfigBuilder().getProfile(t.date);
total.lastTempRate = t.tempBasalConvertedToAbsolute(t.date, profile);
}
}
}
if (ConfigBuilderPlugin.getActivePump().isFakingTempsByExtendedBoluses()) {
@ -346,13 +340,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
if (e.date > time) continue;
IobTotal calc = e.iobCalc(time);
totalExt.plus(calc);
TemporaryBasal t = new TemporaryBasal(e);
if (!t.isEndingEvent() && t.date > total.lastTempDate) {
total.lastTempDate = t.date;
total.lastTempDuration = t.durationInMinutes;
Profile profile = MainApp.getConfigBuilder().getProfile(t.date);
total.lastTempRate = t.tempBasalConvertedToAbsolute(t.date, profile);
}
}
}
// Convert to basal iob
@ -367,7 +354,9 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
@Override
public void updateTotalIOBTempBasals() {
lastTempBasalsCalculation = getCalculationToTimeTempBasals(System.currentTimeMillis());
Profile profile = MainApp.getConfigBuilder().getProfile();
if (profile != null)
lastTempBasalsCalculation = getCalculationToTimeTempBasals(DateUtil.now(), profile);
}
@Nullable

View file

@ -2,9 +2,9 @@ package info.nightscout.androidaps.plugins.Treatments.fragments;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Paint;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.CardView;
@ -18,9 +18,6 @@ import android.widget.TextView;
import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.Intervals;
@ -40,8 +37,6 @@ import info.nightscout.utils.NSUpload;
public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
private static Logger log = LoggerFactory.getLogger(TreatmentsTemporaryBasalsFragment.class);
RecyclerView recyclerView;
LinearLayoutManager llm;
@ -70,7 +65,7 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
holder.ns.setVisibility(NSUpload.isIdValid(tempBasal._id) ? View.VISIBLE : View.GONE);
if (tempBasal.isEndingEvent()) {
holder.date.setText(DateUtil.dateAndTimeString(tempBasal.date));
holder.duration.setText(MainApp.sResources.getString(R.string.cancel));
holder.duration.setText(MainApp.gs(R.string.cancel));
holder.absolute.setText("");
holder.percent.setText("");
holder.realDuration.setText("");
@ -82,14 +77,16 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
} else {
if (tempBasal.isInProgress()) {
holder.date.setText(DateUtil.dateAndTimeString(tempBasal.date));
holder.date.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
} else {
holder.date.setText(DateUtil.dateAndTimeString(tempBasal.date) + " - " + DateUtil.timeString(tempBasal.end()));
holder.date.setText(DateUtil.dateAndTimeRangeString(tempBasal.date, tempBasal.end()));
holder.date.setTextColor(holder.netRatio.getCurrentTextColor());
}
holder.duration.setText(DecimalFormatter.to0Decimal(tempBasal.durationInMinutes) + " min");
holder.duration.setText(DecimalFormatter.to0Decimal(tempBasal.durationInMinutes, " min"));
if (tempBasal.isAbsolute) {
Profile profile = MainApp.getConfigBuilder().getProfile(tempBasal.date);
if (profile != null) {
holder.absolute.setText(DecimalFormatter.to0Decimal(tempBasal.tempBasalConvertedToAbsolute(tempBasal.date, profile)) + " U/h");
holder.absolute.setText(DecimalFormatter.to0Decimal(tempBasal.tempBasalConvertedToAbsolute(tempBasal.date, profile), " U/h"));
holder.percent.setText("");
} else {
holder.absolute.setText(MainApp.gs(R.string.noprofile));
@ -97,24 +94,19 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
}
} else {
holder.absolute.setText("");
holder.percent.setText(DecimalFormatter.to0Decimal(tempBasal.percentRate) + "%");
holder.percent.setText(DecimalFormatter.to0Decimal(tempBasal.percentRate, "%"));
}
holder.realDuration.setText(DecimalFormatter.to0Decimal(tempBasal.getRealDuration()) + " min");
IobTotal iob = new IobTotal(System.currentTimeMillis());
try { // in case app loaded and still no profile selected
iob = tempBasal.iobCalc(System.currentTimeMillis());
} catch (Exception e) {
}
holder.iob.setText(DecimalFormatter.to2Decimal(iob.basaliob) + " U");
holder.netInsulin.setText(DecimalFormatter.to2Decimal(iob.netInsulin) + " U");
holder.netRatio.setText(DecimalFormatter.to2Decimal(iob.netRatio) + " U/h");
//holder.extendedFlag.setVisibility(tempBasal.isExtended ? View.VISIBLE : View.GONE);
holder.realDuration.setText(DecimalFormatter.to0Decimal(tempBasal.getRealDuration(), " min"));
long now = DateUtil.now();
IobTotal iob = new IobTotal(now);
Profile profile = MainApp.getConfigBuilder().getProfile(now);
if (profile != null)
iob = tempBasal.iobCalc(now, profile);
holder.iob.setText(DecimalFormatter.to2Decimal(iob.basaliob, " U"));
holder.netInsulin.setText(DecimalFormatter.to2Decimal(iob.netInsulin, " U"));
holder.netRatio.setText(DecimalFormatter.to2Decimal(iob.netRatio, " U/h"));
holder.extendedFlag.setVisibility(View.GONE);
if (tempBasal.isInProgress())
holder.date.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
else
holder.date.setTextColor(holder.netRatio.getCurrentTextColor());
if (tempBasal.iobCalc(System.currentTimeMillis()).basaliob != 0)
if (iob.basaliob != 0)
holder.iob.setTextColor(ContextCompat.getColor(MainApp.instance(), R.color.colorActive));
else
holder.iob.setTextColor(holder.netRatio.getCurrentTextColor());
@ -172,10 +164,9 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
switch (v.getId()) {
case R.id.tempbasals_remove:
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(MainApp.sResources.getString(R.string.confirmation));
builder.setMessage(MainApp.sResources.getString(R.string.removerecord) + "\n" + DateUtil.dateAndTimeString(tempBasal.date));
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
builder.setTitle(MainApp.gs(R.string.confirmation));
builder.setMessage(MainApp.gs(R.string.removerecord) + "\n" + DateUtil.dateAndTimeString(tempBasal.date));
builder.setPositiveButton(MainApp.gs(R.string.ok), (dialog, id) -> {
final String _id = tempBasal._id;
if (NSUpload.isIdValid(_id)) {
NSUpload.removeCareportalEntryFromNS(_id);
@ -184,9 +175,8 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
}
MainApp.getDbHelper().delete(tempBasal);
FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveTempBasal"));
}
});
builder.setNegativeButton(MainApp.sResources.getString(R.string.cancel), null);
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
builder.show();
break;
}
@ -195,7 +185,7 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.treatments_tempbasals_fragment, container, false);
@ -216,12 +206,12 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
}
@Subscribe
public void onStatusEvent(final EventTempBasalChange ev) {
public void onStatusEvent(final EventTempBasalChange ignored) {
updateGUI();
}
@Subscribe
public void onStatusEvent(final EventNewBG ev) {
public void onStatusEvent(final EventNewBG ignored) {
updateGUI();
}
@ -229,15 +219,11 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
protected void updateGUI() {
Activity activity = getActivity();
if (activity != null)
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
activity.runOnUiThread(() -> {
recyclerView.swapAdapter(new RecyclerViewAdapter(TreatmentsPlugin.getPlugin().getTemporaryBasalsFromHistory()), false);
if (TreatmentsPlugin.getPlugin().getLastCalculationTempBasals() != null) {
String totalText = DecimalFormatter.to2Decimal(TreatmentsPlugin.getPlugin().getLastCalculationTempBasals().basaliob) + " U";
tempBasalTotalView.setText(totalText);
}
}
IobTotal tempBasalsCalculation = TreatmentsPlugin.getPlugin().getLastCalculationTempBasals();
if (tempBasalsCalculation != null)
tempBasalTotalView.setText(DecimalFormatter.to2Decimal(tempBasalsCalculation.basaliob, " U"));
});
}

View file

@ -122,6 +122,10 @@ public class DateUtil {
return dateString(date) + " " + timeString(date);
}
public static String dateAndTimeRangeString(long start, long end) {
return dateAndTimeString(start) + " - " + timeString(end);
}
public static String dateAndTimeString(long mills) {
return dateString(mills) + " " + timeString(mills);
}

View file

@ -17,18 +17,34 @@ public class DecimalFormatter {
return format0dec.format(value);
}
public static String to0Decimal(double value, String unit) {
return format0dec.format(value) + unit;
}
public static String to1Decimal(double value) {
return format1dec.format(value);
}
public static String to1Decimal(double value, String unit) {
return format1dec.format(value) + unit;
}
public static String to2Decimal(double value) {
return format2dec.format(value);
}
public static String to2Decimal(double value, String unit) {
return format2dec.format(value) + unit;
}
public static String to3Decimal(double value) {
return format3dec.format(value);
}
public static String to3Decimal(double value, String unit) {
return format3dec.format(value) + unit;
}
public static String toPumpSupportedBolus(double value) {
return ConfigBuilderPlugin.getActivePump().getPumpDescription().bolusStep <= 0.01
? to2Decimal(value)

View file

@ -69,6 +69,14 @@ public class DateUtilTest {
assertTrue(DateUtil.dateAndTimeString(new Date(1513902750000L)).contains("32"));
}
@Test
public void dateAndTimeRangeStringTest() {
assertTrue(DateUtil.dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"));
assertTrue(DateUtil.dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"));
assertTrue(DateUtil.dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"));
assertTrue(DateUtil.dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"));
}
@Test
public void timeStringFromSecondsTest() {
Assert.assertEquals("1:00 AM", DateUtil.timeStringFromSeconds((int) T.hours(1).secs()));

View file

@ -0,0 +1,56 @@
package info.nightscout.utils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import info.AAPSMocker;
import info.nightscout.androidaps.MainApp;
import static org.junit.Assert.*;
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class})
public class DecimalFormatterTest {
@Test
public void to0DecimalTest() {
Assert.assertEquals("1", DecimalFormatter.to0Decimal(1.33d));
Assert.assertEquals("1U", DecimalFormatter.to0Decimal(1.33d, "U"));
}
@Test
public void to1DecimalTest() {
Assert.assertEquals("1.3", DecimalFormatter.to1Decimal(1.33d));
Assert.assertEquals("1.3U", DecimalFormatter.to1Decimal(1.33d, "U"));
}
@Test
public void to2DecimalTest() {
Assert.assertEquals("1.33", DecimalFormatter.to2Decimal(1.3333d));
Assert.assertEquals("1.33U", DecimalFormatter.to2Decimal(1.3333d, "U"));
}
@Test
public void to3DecimalTest() {
Assert.assertEquals("1.333", DecimalFormatter.to3Decimal(1.3333d));
Assert.assertEquals("1.333U", DecimalFormatter.to3Decimal(1.3333d, "U"));
}
@Test
public void toPumpSupportedBolus() {
}
@Test
public void pumpSupportedBolusFormat() {
}
@Before
public void prepareMock() {
AAPSMocker.mockMainApp();
AAPSMocker.mockStrings();
}
}