MessageCenterResolver extends UrbanAirshipResolver { int deleteMessages(@NonNull Set<String> messageIds) { String query = MessageCenterDataManager.MessageTable.COLUMN_NAME_MESSAGE_ID + " IN ( " + UAStringUtil.repeat("?", messageIds.size(), ", ") + " )"; return this.delete(this.uri, query, messageIds.toArray(new String[0])); } MessageCenterResolver(Context context);   }
@Test public void testDeleteMessages() { Set<String> keys = new HashSet<>(); keys.add("1_message_id"); keys.add("2_message_id"); keys.add("6_message_id"); int deleted = resolver.deleteMessages(keys); assertEquals(keys.size(), deleted); for (Message message : resolver.getMessages()) { assertFalse(keys.contains(message.getMessageId())); } assertEquals(7, resolver.getMessages().size()); }