aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-REST/src/test/java/org/onap/policy/rest/jpa
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-REST/src/test/java/org/onap/policy/rest/jpa')
-rw-r--r--ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ActionDictionaryJpaTest.java31
-rw-r--r--ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FwDictionaryJpaTest.java (renamed from ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FWDictionaryJPATest.java)111
-rw-r--r--ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ModelsTest.java57
-rw-r--r--ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJpaTest.java (renamed from ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJPATest.java)123
4 files changed, 248 insertions, 74 deletions
diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ActionDictionaryJpaTest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ActionDictionaryJpaTest.java
index 047053a83..a840f9d9d 100644
--- a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ActionDictionaryJpaTest.java
+++ b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ActionDictionaryJpaTest.java
@@ -98,9 +98,10 @@ public class ActionDictionaryJpaTest {
assertTrue(data.getFunctionDefinition() != null);
data.setId(1);
assertTrue(1 == data.getId());
- data.isBag();
- data.toString();
+ assertFalse(data.isBag());
+ assertEquals("FunctionArgument(id=1", data.toString().substring(0, 21));
data.setIsBag(1);
+ assertTrue(data.isBag());
assertTrue(1 == data.getIsBag());
new FunctionArgument(data);
}
@@ -116,10 +117,10 @@ public class ActionDictionaryJpaTest {
assertTrue(data.getDatatypeBean() != null);
data.setFunctionArguments(new ArrayList<>());
assertTrue(data.getFunctionArguments() != null);
- data.setHigherOrderArg_LB(1);
- assertTrue(1 == data.getHigherOrderArg_LB());
- data.setHigherOrderArg_UB(1);
- assertTrue(1 == data.getHigherOrderArg_UB());
+ data.setHigherOrderArgLb(1);
+ assertTrue(1 == data.getHigherOrderArgLb());
+ data.setHigherOrderArgUb(1);
+ assertTrue(1 == data.getHigherOrderArgUb());
data.setId(1);
assertTrue(1 == data.getId());
data.setIsBagReturn(1);
@@ -130,11 +131,19 @@ public class ActionDictionaryJpaTest {
assertTrue("Test".equals(data.getShortname()));
data.setXacmlid("Test");
assertTrue("Test".equals(data.getXacmlid()));
- data.toString();
- data.isBagReturn();
- data.isHigherOrder();
- data.addFunctionArgument(new FunctionArgument());
- data.removeFunctionArgument(new FunctionArgument());
+ assertTrue(data.toString().startsWith("FunctionDefinition(id=1"));
+ assertTrue(data.isBagReturn());
+ data.setIsBagReturn(0);
+ assertTrue(data.isHigherOrder());
+ assertFalse(data.isBagReturn());
+ data.setIsHigherOrder(0);
+ assertFalse(data.isHigherOrder());
+ FunctionArgument functionArgument = new FunctionArgument();
+ functionArgument.setId(12345);
+ data.addFunctionArgument(functionArgument);
+ assertEquals(12345, data.getFunctionArguments().iterator().next().getId());
+ data.removeFunctionArgument(functionArgument);
+ assertTrue(data.getFunctionArguments().isEmpty());
}
@Test
diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FWDictionaryJPATest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FwDictionaryJpaTest.java
index b3b23e429..cee9dde78 100644
--- a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FWDictionaryJPATest.java
+++ b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/FwDictionaryJpaTest.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +18,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.rest.jpa;
import static org.junit.Assert.assertTrue;
@@ -28,11 +30,19 @@ import org.junit.Test;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-public class FWDictionaryJPATest {
+/**
+ * The Class FWDictionaryJPATest.
+ */
+public class FwDictionaryJpaTest {
- private static Logger logger = FlexLogger.getLogger(FWDictionaryJPATest.class);
+ private static Logger logger = FlexLogger.getLogger(FwDictionaryJpaTest.class);
private UserInfo userInfo;
+ /**
+ * Sets the up.
+ *
+ * @throws Exception the exception
+ */
@Before
public void setUp() throws Exception {
logger.info("setUp: Entering");
@@ -42,8 +52,11 @@ public class FWDictionaryJPATest {
logger.info("setUp: exit");
}
+ /**
+ * Test action list.
+ */
@Test
- public void testActionList(){
+ public void testActionList() {
ActionList data = new ActionList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -53,8 +66,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getDescription()));
}
+ /**
+ * Test port list.
+ */
@Test
- public void testPortList(){
+ public void testPortList() {
PortList data = new PortList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -64,8 +80,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getDescription()));
}
+ /**
+ * Test protocol list.
+ */
@Test
- public void testProtocolList(){
+ public void testProtocolList() {
ProtocolList data = new ProtocolList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -75,8 +94,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getDescription()));
}
+ /**
+ * Test security zone.
+ */
@Test
- public void testSecurityZone(){
+ public void testSecurityZone() {
SecurityZone data = new SecurityZone();
data.setId(1);
assertTrue(1 == data.getId());
@@ -86,8 +108,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getZoneValue()));
}
+ /**
+ * Test zone.
+ */
@Test
- public void testZone(){
+ public void testZone() {
Zone data = new Zone();
data.setId(1);
assertTrue(1 == data.getId());
@@ -97,8 +122,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getZoneValue()));
}
+ /**
+ * Test address group.
+ */
@Test
- public void testAddressGroup(){
+ public void testAddressGroup() {
AddressGroup data = new AddressGroup();
data.setId(1);
assertTrue(1 == data.getId());
@@ -110,8 +138,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getDescription()));
}
+ /**
+ * Test prefix list.
+ */
@Test
- public void testPrefixList(){
+ public void testPrefixList() {
PrefixList data = new PrefixList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -123,8 +154,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getDescription()));
}
+ /**
+ * Test FW dictionary list.
+ */
@Test
- public void testFWDictionaryList(){
+ public void testFwDictionaryList() {
FirewallDictionaryList data = new FirewallDictionaryList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -138,9 +172,12 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getServiceList()));
}
+ /**
+ * Test FW tag.
+ */
@Test
- public void testFWTag(){
- FWTag data = new FWTag();
+ public void testFwTag() {
+ FwTag data = new FwTag();
data.preUpdate();
data.prePersist();
data.setId(1);
@@ -152,18 +189,21 @@ public class FWDictionaryJPATest {
data.setTagValues("Test");
assertTrue("Test".equals(data.getTagValues()));
data.setCreatedDate(new Date());
- assertTrue(data.getCreatedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
data.setModifiedDate(new Date());
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getModifiedDate() != null);
data.setUserCreatedBy(userInfo);
- assertTrue(data.getUserCreatedBy()!=null);
+ assertTrue(data.getUserCreatedBy() != null);
data.setUserModifiedBy(userInfo);
- assertTrue(data.getUserModifiedBy()!=null);
+ assertTrue(data.getUserModifiedBy() != null);
}
+ /**
+ * Test FW tag picker.
+ */
@Test
- public void testFWTagPicker(){
- FWTagPicker data = new FWTagPicker();
+ public void testFwTagPicker() {
+ FwTagPicker data = new FwTagPicker();
data.preUpdate();
data.prePersist();
data.setId(1);
@@ -177,17 +217,20 @@ public class FWDictionaryJPATest {
data.setTagValues("Test");
assertTrue("Test".equals(data.getTagValues()));
data.setCreatedDate(new Date());
- assertTrue(data.getCreatedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
data.setModifiedDate(new Date());
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getModifiedDate() != null);
data.setUserCreatedBy(userInfo);
- assertTrue(data.getUserCreatedBy()!=null);
+ assertTrue(data.getUserCreatedBy() != null);
data.setUserModifiedBy(userInfo);
- assertTrue(data.getUserModifiedBy()!=null);
+ assertTrue(data.getUserModifiedBy() != null);
}
+ /**
+ * Test service list.
+ */
@Test
- public void testServiceList(){
+ public void testServiceList() {
ServiceList data = new ServiceList();
data.setId(1);
assertTrue(1 == data.getId());
@@ -205,8 +248,11 @@ public class FWDictionaryJPATest {
assertTrue("Test".equals(data.getServicePorts()));
}
+ /**
+ * Test term list.
+ */
@Test
- public void testTermList(){
+ public void testTermList() {
TermList data = new TermList();
data.preUpdate();
data.prePersist();
@@ -235,17 +281,20 @@ public class FWDictionaryJPATest {
data.setAction("Test");
assertTrue("Test".equals(data.getAction()));
data.setCreatedDate(new Date());
- assertTrue(data.getCreatedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
data.setModifiedDate(new Date());
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getModifiedDate() != null);
data.setUserCreatedBy(userInfo);
- assertTrue(data.getUserCreatedBy()!=null);
+ assertTrue(data.getUserCreatedBy() != null);
data.setUserModifiedBy(userInfo);
- assertTrue(data.getUserModifiedBy()!=null);
+ assertTrue(data.getUserModifiedBy() != null);
}
+ /**
+ * Test group service list.
+ */
@Test
- public void testGroupServiceList(){
+ public void testGroupServiceList() {
GroupServiceList data = new GroupServiceList();
data.setId(1);
assertTrue(1 == data.getId());
diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ModelsTest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ModelsTest.java
new file mode 100644
index 000000000..fb1b8a527
--- /dev/null
+++ b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/ModelsTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.rest.jpa;
+
+import com.openpojo.reflection.filters.FilterClassName;
+import com.openpojo.reflection.filters.FilterPackageInfo;
+import com.openpojo.validation.Validator;
+import com.openpojo.validation.ValidatorBuilder;
+import com.openpojo.validation.test.impl.GetterTester;
+import com.openpojo.validation.test.impl.SetterTester;
+
+import org.junit.Test;
+import org.onap.policy.common.utils.test.ToStringTester;
+
+/**
+ * Class to perform unit testing of POJOs.
+ */
+public class ModelsTest {
+ private static final String POJO_PACKAGE = "org.onap.policy.rest.jpa";
+
+ @Test
+ public void testPdpModels() {
+ // @formatter:off
+ final Validator validator =
+ ValidatorBuilder.create()
+ .with(new ToStringTester())
+ .with(new SetterTester())
+ .with(new GetterTester())
+ .build();
+
+ // exclude Test classes and PdpMessage
+ validator.validate(
+ POJO_PACKAGE,
+ new FilterPackageInfo(),
+ new FilterClassName("^((?!Test$).)*$")
+ );
+ // @formatter:on
+ }
+}
diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJPATest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJpaTest.java
index 706471281..224513eee 100644
--- a/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJPATest.java
+++ b/ONAP-REST/src/test/java/org/onap/policy/rest/jpa/PolicyEntityJpaTest.java
@@ -3,13 +3,14 @@
* ONAP-REST
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,8 +18,11 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.rest.jpa;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.Date;
@@ -28,11 +32,19 @@ import org.junit.Test;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-public class PolicyEntityJPATest {
+/**
+ * The Class PolicyEntityJpaTest.
+ */
+public class PolicyEntityJpaTest {
- private static Logger logger = FlexLogger.getLogger(PolicyEntityJPATest.class);
+ private static Logger logger = FlexLogger.getLogger(PolicyEntityJpaTest.class);
private UserInfo userInfo;
+ /**
+ * Sets the up.
+ *
+ * @throws Exception the exception
+ */
@Before
public void setUp() throws Exception {
logger.info("setUp: Entering");
@@ -42,8 +54,11 @@ public class PolicyEntityJPATest {
logger.info("setUp: exit");
}
+ /**
+ * Test policy group entity.
+ */
@Test
- public void testPolicyGroupEntity(){
+ public void testPolicyGroupEntity() {
PolicyGroupEntity data = new PolicyGroupEntity();
data.setGroupKey(1);
assertTrue(1 == data.getGroupKey());
@@ -51,8 +66,11 @@ public class PolicyEntityJPATest {
assertTrue(1 == data.getPolicyid());
}
+ /**
+ * Test policy DB dao entity.
+ */
@Test
- public void testPolicyDBDaoEntity(){
+ public void testPolicyDbDaoEntity() {
PolicyDBDaoEntity data = new PolicyDBDaoEntity();
data.prePersist();
data.preUpdate();
@@ -60,23 +78,29 @@ public class PolicyEntityJPATest {
assertTrue("Test".equals(data.getPolicyDBDaoUrl()));
data.setDescription("Test");
assertTrue("Test".equals(data.getDescription()));
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.setUsername("Test");
assertTrue("Test".equals(data.getUsername()));
data.setPassword("Test");
assertTrue("Test".equals(data.getPassword()));
}
+ /**
+ * Test database lock entity.
+ */
@Test
- public void testDatabaseLockEntity(){
+ public void testDatabaseLockEntity() {
DatabaseLockEntity data = new DatabaseLockEntity();
data.setKey(1);
assertTrue(1 == data.getKey());
}
+ /**
+ * Test policy entity.
+ */
@Test
- public void testPolicyEntity(){
+ public void testPolicyEntity() {
PolicyEntity data = new PolicyEntity();
data.prePersist();
data.preUpdate();
@@ -84,14 +108,14 @@ public class PolicyEntityJPATest {
assertTrue("Test".equals(data.getPolicyName()));
data.setDescription("Test");
assertTrue("Test".equals(data.getDescription()));
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.setPolicyData("Test");
assertTrue("Test".equals(data.getPolicyData()));
data.setConfigurationData(new ConfigurationDataEntity());
- assertTrue(data.getConfigurationData()!=null);
+ assertTrue(data.getConfigurationData() != null);
data.setActionBodyEntity(new ActionBodyEntity());
- assertTrue(data.getActionBodyEntity()!=null);
+ assertTrue(data.getActionBodyEntity() != null);
data.setScope("Test");
assertTrue("Test".equals(data.getScope()));
data.setCreatedBy("Test");
@@ -104,8 +128,11 @@ public class PolicyEntityJPATest {
data.hashCode();
}
+ /**
+ * Test action body entity.
+ */
@Test
- public void testActionBodyEntity(){
+ public void testActionBodyEntity() {
ActionBodyEntity data = new ActionBodyEntity();
data.prePersist();
data.preUpdate();
@@ -118,18 +145,21 @@ public class PolicyEntityJPATest {
data.setModifiedBy("Test");
assertTrue("Test".equals(data.getModifiedBy()));
data.setModifiedDate(new Date());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.setDeleted(true);
assertTrue(data.isDeleted());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.equals(new ConfigurationDataEntity());
data.hashCode();
}
+ /**
+ * Test configuration data entity.
+ */
@Test
- public void testConfigurationDataEntity(){
+ public void testConfigurationDataEntity() {
ConfigurationDataEntity data = new ConfigurationDataEntity();
data.prePersist();
data.preUpdate();
@@ -146,18 +176,21 @@ public class PolicyEntityJPATest {
data.setModifiedBy("Test");
assertTrue("Test".equals(data.getModifiedBy()));
data.setModifiedDate(new Date());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.setDeleted(true);
assertTrue(data.isDeleted());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
data.equals(new ConfigurationDataEntity());
data.hashCode();
}
+ /**
+ * Test pdp entity.
+ */
@Test
- public void testPdpEntity(){
+ public void testPdpEntity() {
PdpEntity data = new PdpEntity();
data.prePersist();
data.preUpdate();
@@ -166,7 +199,7 @@ public class PolicyEntityJPATest {
data.setPdpName("Test");
assertTrue("Test".equals(data.getPdpName()));
data.setGroup(new GroupEntity());
- assertTrue(data.getGroup()!=null);
+ assertTrue(data.getGroup() != null);
data.setCreatedBy("Test");
assertTrue("Test".equals(data.getCreatedBy()));
data.setDescription("Test");
@@ -177,19 +210,22 @@ public class PolicyEntityJPATest {
assertTrue(1 == data.getJmxPort());
data.setDeleted(true);
assertTrue(data.isDeleted());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
}
+ /**
+ * Test group entity.
+ */
@Test
- public void testGroupEntity(){
+ public void testGroupEntity() {
GroupEntity data = new GroupEntity();
data.prePersist();
data.preUpdate();
data.setGroupId("Test");
assertTrue("Test".equals(data.getGroupId()));
data.setGroupName("Test");
- assertTrue("Test".equals(data.getgroupName()));
+ assertTrue("Test".equals(data.getGroupName()));
data.setCreatedBy("Test");
assertTrue("Test".equals(data.getCreatedBy()));
data.setDescription("Test");
@@ -200,7 +236,30 @@ public class PolicyEntityJPATest {
assertTrue(data.isDefaultGroup());
data.setDeleted(true);
assertTrue(data.isDeleted());
- assertTrue(data.getCreatedDate()!=null);
- assertTrue(data.getModifiedDate()!=null);
+ assertTrue(data.getCreatedDate() != null);
+ assertTrue(data.getModifiedDate() != null);
+
+ assertNull(data.getPolicies());
+ PolicyEntity policy0 = new PolicyEntity();
+ policy0.setPolicyName("PolicyName0");
+ data.addPolicyToGroup(policy0);
+ PolicyEntity policy1 = new PolicyEntity();
+ policy1.setPolicyName("PolicyName1");
+ assertTrue(data.getPolicies().contains(policy0));
+ assertFalse(data.getPolicies().contains(policy1));
+ data.addPolicyToGroup(policy1);
+ assertTrue(data.getPolicies().contains(policy0));
+ assertTrue(data.getPolicies().contains(policy1));
+ data.addPolicyToGroup(policy1);
+ assertTrue(data.getPolicies().contains(policy0));
+ assertTrue(data.getPolicies().contains(policy1));
+ data.removePolicyFromGroup(policy0);
+ assertFalse(data.getPolicies().contains(policy0));
+ assertTrue(data.getPolicies().contains(policy1));
+ data.removePolicyFromGroup(policy0);
+ assertFalse(data.getPolicies().contains(policy0));
+ assertTrue(data.getPolicies().contains(policy1));
+ data.removePolicyFromGroup(policy1);
+ assertNull(data.getPolicies());
}
}