UserNotification extends Model { public static UserNotification lastExtraCalibrationAlert() { return new Select() .from(UserNotification.class) .where("extra_calibration_alert = ?", true) .orderBy("_ID desc") .executeSingle(); }  static void fixUpTable(); static UserNotification lastBgAlert(); static UserNotification lastCalibrationAlert(); static UserNotification lastDoubleCalibrationAlert(); static UserNotification lastExtraCalibrationAlert(); static UserNotification GetNotificationByType(String type); static void DeleteNotificationByType(String type); static void snoozeAlert(String type, long snoozeMinutes); static UserNotification create(String message, String type, long timestamp); @Column(name = "timestamp", index = true)
    public double timestamp; @Column(name = "message")
    public String message; @Column(name = "bg_alert")
    public boolean bg_alert; @Column(name = "calibration_alert")
    public boolean calibration_alert; @Column(name = "double_calibration_alert")
    public boolean double_calibration_alert; @Column(name = "extra_calibration_alert")
    public boolean extra_calibration_alert; @Column(name = "bg_unclear_readings_alert")
    public boolean bg_unclear_readings_alert; @Column(name = "bg_missed_alerts")
    public boolean bg_missed_alerts; @Column(name = "bg_rise_alert")
    public boolean bg_rise_alert; @Column(name = "bg_fall_alert")
    public boolean bg_fall_alert; }
@Test public void lastExtraCalibrationAlert() { UserNotification.create("test1", "extra_calibration_alert", System.currentTimeMillis()); UserNotification.create("test2", "extra_calibration_alert", System.currentTimeMillis()); UserNotification userNotification = UserNotification.lastExtraCalibrationAlert(); assertThat(userNotification.extra_calibration_alert).isTrue(); assertThat(userNotification.message).isEqualTo("test2"); }