### Question:
PreferencesBasedRepository implements Repository { @Override public void updateProgressDate(DateAtMidnight aDate) { prefs.putLong("last_feedback_timestamp", aDate.getTime()); prefs.flush(); } PreferencesBasedRepository(Preferences prefs); @Override Set<MiniHabit> findAll(); @Override void add(MiniHabit miniHabit); @Override void update(Collection<MiniHabit> list); @Override void updateProgressDate(DateAtMidnight aDate); @Override DateAtMidnight lastFeedbackDate();  }### Answer:
@Test public void updateProgressDate() { context.checking(new Expectations() {{ oneOf(preferences).putLong("last_feedback_timestamp", 1495144800000L); oneOf(preferences).flush(); }}); repo.updateProgressDate(from(date("19 May 2017"))); }