summaryrefslogtreecommitdiffstats
path: root/models-base/src/test/java/org
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-08 11:45:24 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-08 11:45:24 +0000
commit99e1be6032444088e35c98e290ac4c5e4e0ab601 (patch)
tree143ebd270c9dc8eb0dc1cb465be07542abe6b9ab /models-base/src/test/java/org
parent043e5ebb3c56a999559406ddd174da25ca6be788 (diff)
parentbd6500bf91fcd7fc1e1bbcf438bd4a4e7ff4a3c0 (diff)
Merge "Clean up a couple of array lists"
Diffstat (limited to 'models-base/src/test/java/org')
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/PfUtilsTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfUtilsTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfUtilsTest.java
index 11ddf3132..339ee9d1b 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/PfUtilsTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/PfUtilsTest.java
@@ -52,9 +52,19 @@ public class PfUtilsTest {
});
assertTrue(resultList.isEmpty());
+ // verify that we can modify the empty list without throwing an exception
+ resultList.add("xyz");
+ resultList.add("pdq");
+ resultList.remove("xyz");
+
+
List<String> origList = Arrays.asList("abc", "def");
List<String> newList = PfUtils.mapList(origList, text -> text + "X");
assertEquals(Arrays.asList("abcX", "defX"), newList);
+
+ // verify that we can modify the list without throwing an exception
+ newList.remove("abcX");
+ newList.add("something else");
}
}