@Autowired
WxUserGroupService userGroupService;
@Test
public void testAll() throws WxException {
WxGroupEntity newgroup = userGroupService.remoteGroupsCreate(accessToken, "API测试组");
List<WxGroupEntity> groups = userGroupService.remoteGroupsGet(accessToken);
boolean found = false;
for (WxGroupEntity group : groups) {
if (group.getName().equals(newgroup.getName())) {
found = true;
}
}
if (found == false) {
throw new WxException("not found newly created group!");
}
userGroupService.remoteGroupsUpdate(accessToken, newgroup.getWxId(), "API测试组2");
}