From bc23e7cbb04f79daf15798ae472041788bb28046 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 25 Apr 2019 08:55:05 -0400 Subject: Populate policies, even if empty Modified PdpUpdate to create an empty policy list, by default, rather than leaving it null. Change-Id: I81906410bcc7da21d6471d496713ec9b375632a2 Issue-ID: POLICY-1692 Signed-off-by: Jim Hahn --- .../src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'models-pdp/src/test') diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java index 8889e483f..2dfcb30fe 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpUpdateTest.java @@ -41,6 +41,7 @@ public class PdpUpdateTest { assertThatThrownBy(() -> new PdpUpdate(null)).isInstanceOf(NullPointerException.class); PdpUpdate orig = new PdpUpdate(); + orig.setPolicies(null); // verify with null values assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpUpdate(orig).toString())); -- cgit 1.2.3-korg