EventResolver extends UrbanAirshipResolver { boolean deleteEvents(@Nullable Set<String> eventIds) { if (eventIds == null || eventIds.size() == 0) { Logger.verbose("EventsStorage - Nothing to delete. Returning."); return false; } int numOfEventIds = eventIds.size(); String inStatement = repeat("?", numOfEventIds, ", "); int deleted = delete(uri, EventsStorage.Events.COLUMN_NAME_EVENT_ID + " IN ( " + inStatement + " )", eventIds.toArray(new String[numOfEventIds])); return deleted > 0; } EventResolver(@NonNull Context context);  @NonNull
    static final String ASCENDING_SORT_ORDER; }
@Test public void testDeleteEvents() { eventResolver.insertEvent(new TestEvent("id-1"), "session-id"); eventResolver.insertEvent(new TestEvent("id-2"), "session-id"); eventResolver.insertEvent(new TestEvent("id-3"), "session-id"); eventResolver.insertEvent(new TestEvent("id-4"), "session-id"); assertEquals(4, eventResolver.getEventCount()); assertTrue(eventResolver.deleteEvents(new HashSet<>(Arrays.asList("id-1", "id-2", "id-4")))); assertEquals(1, eventResolver.getEventCount()); assertTrue(eventResolver.getEvents(1).containsKey("id-3")); }