def METHOD_NAME(self):
    package = {
        "package_creator": "test function",
        "private": False,
        "dataset_date": "[1960-01-01 TO 2012-12-31]",
        "indicator": "1",
        "caveats": "These are the caveats",
        "license_other": "TEST OTHER LICENSE",
        "methodology": "This is a test methodology",
        "dataset_source": "World Bank",
        "license_id": "hdx-other",
        "name": "test_activity_3_with_2_groups",
        "notes": "This is a test activity",
        "title": "Test Activity 3 with 2 Groups",
        "owner_org": "hdx-test-org",
    }
    context = {'ignore_auth': True,
               'model': model, 'session': model.Session, 'user': 'testsysadmin'}
    self._get_action('organization_create')(context, organization)
    group_list = caching.cached_group_list()
    try:
        package['groups'] = [{"id": group_list[0]['id']}, {"name": 'non-existing name'}]
        self._get_action('package_create')(context, package)
        assert False
    except logic.ValidationError:
        assert True
    try:
        package['groups'] = [{"id": group_list[0]['id']}, {"name": group_list[1]['name']}]
        self._get_action('package_create')(context, package)
        data_dict = self._get_action('package_show')(context, {"id": "test_activity_3_with_2_groups"})
        assert len(data_dict.get('groups', [])) == 2
    except logic.ValidationError:
        assert False