### Question:
SQLiteLocalStorage implements LocalStorage { @Override public void saveNotificationAuthenticated(int notificationId, long time) { if (database.isOpen()) { database.beginTransaction(); try { ContentValues values = new ContentValues(); values.put(NOTIFICATIONS_AUTHENTICATED_COLUMN_ID, notificationId); values.put(NOTIFICATIONS_AUTHENTICATED_COLUMN_TIME, time); insertOrUpdate(NOTIFICATIONS_AUTHENTICATED_TABLE_NAME, values, NOTIFICATIONS_AUTHENTICATED_COLUMN_ID + "= ?", new String[]{String.valueOf(notificationId)}); database.setTransactionSuccessful(); } finally { database.endTransaction(); } } } SQLiteLocalStorage(Context context, String dbName, long maxDbSize); @Override long addEvent(String userId, String eventJSON); @Override synchronized void removeEvents(String userId, Collection<Long> ids); @Override LinkedHashMap<Long, String> getFirstNEvents(Integer n, String userId); @Override void setCacheEntry(String userId, String category, String rawData); @Override void setSecureCacheEntryForUser(String userId, String category, String rawData, String signature); @Override SwrveCacheItem getCacheItem(String userId, String category); @Override String getSecureCacheEntryForUser(String userId, String category, String uniqueKey); void saveMultipleEventItems(List<SwrveEventItem> eventList); void saveMultipleCacheItems(Map<String, SwrveCacheItem> cacheItemMap); @Override void saveUser(SwrveUser swrveUser); @Override SwrveUser getUserByExternalUserId(String externalUserId); @Override SwrveUser getUserBySwrveUserId(String swrveUserId); @Override synchronized void deleteUser(String swrveUserId); @Override void truncateNotificationsAuthenticated(int rows); @Override void saveNotificationAuthenticated(int notificationId, long time); @Override void deleteNotificationsAuthenticated(); @Override List<Integer> getNotificationsAuthenticated(); @Override void saveOfflineCampaign(String userId, String campaignId, String campaignData); @Override String getOfflineCampaign(String userId, String campaignId);  }### Answer:
@Test public void testSaveNotificationAuthenicated() { SQLiteLocalStorage sqLiteLocalStorage = (SQLiteLocalStorage) localStorage; sqLiteLocalStorage.saveNotificationAuthenticated(1, 123); sqLiteLocalStorage.saveNotificationAuthenticated(2, 124); sqLiteLocalStorage.saveNotificationAuthenticated(3, 125); sqLiteLocalStorage.saveNotificationAuthenticated(3, 126); SQLiteDatabase database = sqLiteLocalStorage.database; Cursor cursor = database.rawQuery("SELECT * FROM " + NOTIFICATIONS_AUTHENTICATED_TABLE_NAME, null); if (cursor.moveToFirst()) { int row = 1; while (cursor.isAfterLast() == false) { long notificationId = cursor.getLong(cursor.getColumnIndex(NOTIFICATIONS_AUTHENTICATED_COLUMN_ID)); assertEquals(row, notificationId); row++; cursor.moveToNext(); } } else { fail("testSaveCurrentNotifications failed because cursor is empty and should contain entries."); } }