### Question:
Utils { public static long calculateNotifTime(Long nowMillis, int hourToNotify) { DateTime now = new DateTime(nowMillis); DateTime timeToNotify = new DateTime(nowMillis); timeToNotify = timeToNotify.withHourOfDay(hourToNotify); if (timeToNotify.isBefore(now)) { timeToNotify = timeToNotify.plusDays(1); } return timeToNotify.getMillis(); }  static String getCongrats(Context ctx, Event event); static String getEventLabel(Context ctx, Event event); static String getEventLabel(Context ctx, EditableEvent evt); static void startWidgetUpdateAlarm(Context ctx); static void startNotificationAlarm(Context ctx, long time); static void cancelNotificationAlarm(Context ctx); static long calculateNotifTime(Long nowMillis, int hourToNotify); static void setOrCancelNotificationsAlarm(Context context, SharedPreferences prefs); static final String WIDGET_UPDATE; }### Answer:
@Test public void testCalculateNotifTime() { DateTime time = new DateTime(); time = time.withHourOfDay(8); DateTime notifyTime = new DateTime(Utils.calculateNotifTime(time.getMillis(), 7)); assertEquals(1000 * 60 * 60 * 23, notifyTime.getMillis() - time.getMillis()); notifyTime = new DateTime(Utils.calculateNotifTime(time.getMillis(), 9)); assertEquals(1000 * 60 * 60, notifyTime.getMillis() - time.getMillis()); }