EasemobChatGroups { public static ObjectNode deleteChatGroups(String chatgroupid) { ObjectNode objectNode = factory.objectNode(); if (!JerseyUtils.match("^(?!-)[0-9a-zA-Z\\-]+#[0-9a-zA-Z]+", APPKEY)) { LOGGER.error("Bad format of Appkey: " + APPKEY); objectNode.put("message", "Bad format of Appkey"); return objectNode; } try { JerseyWebTarget webTarget = null; webTarget = EndPoints.CHATGROUPS_TARGET.resolveTemplate("org_name", APPKEY.split("#")[0]) .resolveTemplate("app_name", APPKEY.split("#")[1]).path(chatgroupid); objectNode = JerseyUtils.sendRequest(webTarget, null, credential, HTTPMethod.METHOD_DELETE, null); } catch (Exception e) { e.printStackTrace(); } return objectNode; }  static ObjectNode getAllChatgroupids(); static ObjectNode getGroupDetailsByChatgroupid(String[] chatgroupIDs); static ObjectNode createChatGroups(ObjectNode dataObjectNode); static ObjectNode deleteChatGroups(String chatgroupid); static ObjectNode getAllMemberssByGroupId(String chatgroupid); static ObjectNode addUserToGroup(String chatgroupid, String userprimarykey); static ObjectNode deleteUserFromGroup(String chatgroupid, String userprimarykey); static ObjectNode getJoinedChatgroupsForIMUser(String username); static ObjectNode addUsersToGroupBatch(String toAddBacthChatgroupid, ObjectNode usernames);  }
@Test public void testDeleteChatGroups() throws Exception { String toDelChatgroupid = "1405735927133519"; ObjectNode deleteChatGroupNode = EasemobChatGroups.deleteChatGroups(toDelChatgroupid) ; System.out.println(deleteChatGroupNode.toString()); }