@@ -0,0 +1,1302 @@
+/* 2) Use case: Store Favorite%0A * User story: As a user, My favorites and their replies should always be available to me regardless of %0A * network connectivity.%0A */%0A%0A// Check if favorites can be loaded from memory with and without internet%0Apublic void testReadFavorite (Context context, User user) %7B%0A    FavoritesListModel storedFaves;%0A%0A    FileInputStream fileIn = context.openFileInput(%22localFaves.sav%22);%0A    ObjectInputStream objectIn = new ObjectInputStream(fileIn);%0A    storedFaves = (ArrayList%3CFavoritesListModel%3E) objectIn.readObject();%0A    objectIn.close();%0A    fileIn.close();%0A    %0A    assertEquals(storedFaves, user.FavoritesList);%0A%7D%0A%0A// Check if favorites being stored when marked as a favorite%0Apublic void testStoreFavorite (Context context) %7B%0A%0A    FavoritesListModel storeFave = new FavoritesListModel();%0A    FavoritesListController.addComment(storeFave);%0A%0A    ArrayList %3CFavoritesListModel%3E storedFaves;%0A    FavoritesListModel lastFave;%0A%0A    FileInputStream fileIn = context.openFileInput(%22localFaves.sav%22);%0A    ObjectInputStream objectIn = new ObjectInputStream(fileIn);%0A    storedFaves = (ArrayList%3CFavoritesListModel%3E) objectIn.readObject();%0A    objectIn.close();%0A    fileIn.close();%0A%0A    lastFave = storedFaves.get(storedFaves.size() - 1);%0A%0A    assertEquals(storeFave, lastFave);  %0A%7D%0A

Create UseCase12.java