### Question:
SQLiteLocalStorage implements LocalStorage { public void saveMultipleEventItems(List<SwrveEventItem> eventList) throws SQLException { if (database.isOpen()) { String sql = "INSERT INTO " + EVENTS_TABLE_NAME + " (" + EVENTS_COLUMN_EVENT + ", " + EVENTS_COLUMN_USER_ID + ") VALUES (?, ?)"; database.beginTransaction(); SQLiteStatement statement = null; try { statement = database.compileStatement(sql); for (SwrveEventItem eventItem : eventList) { statement.bindString(1, eventItem.event); statement.bindString(2, eventItem.userId); statement.execute(); statement.clearBindings(); } database.setTransactionSuccessful(); } finally { if (statement != null) { statement.close(); } 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 testSaveMultipleEventItems() { String userId = "userId_AddMultipleEvent"; SQLiteLocalStorage sqLiteLocalStorage = (SQLiteLocalStorage) localStorage; assertEquals(0, sqLiteLocalStorage.getFirstNEvents(100, userId).size()); List<SwrveEventItem> events = new ArrayList<>(); SwrveEventItem item1 = createEventItem(userId, "event1"); SwrveEventItem item2 = createEventItem(userId, "event2"); events.add(item1); events.add(item2); sqLiteLocalStorage.saveMultipleEventItems(events); LinkedHashMap<Long, String> firstNEvents = sqLiteLocalStorage.getFirstNEvents(100, userId); assertEquals(2, firstNEvents.size()); assertTrue(firstNEvents.containsKey(1L)); assertEquals(item1.event, firstNEvents.get(1L)); assertTrue(firstNEvents.containsKey(2L)); assertEquals(item2.event, firstNEvents.get(2L)); }