aboutsummaryrefslogtreecommitdiffstats
path: root/models-base/src/test/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'models-base/src/test/java/org/onap')
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
index 91fa301f9..8fa757a00 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
@@ -110,7 +110,8 @@ public class ValidatedTest {
BeanValidationResult result2 = new BeanValidationResult("", this);
// null parameter tests
- assertThatThrownBy(() -> Validated.validateKeyNotNull(result2, null, new PfConceptKey()))
+ PfConceptKey conceptKey = new PfConceptKey();
+ assertThatThrownBy(() -> Validated.validateKeyNotNull(result2, null, conceptKey))
.isInstanceOf(NullPointerException.class);
assertThatCode(() -> Validated.validateKeyNotNull(result2, MY_FIELD, null)).doesNotThrowAnyException();
@@ -131,7 +132,8 @@ public class ValidatedTest {
assertThat(result.getResult()).contains(MY_FIELD).contains("version").contains(Validated.IS_NULL);
BeanValidationResult result2 = new BeanValidationResult("", this);
- assertThatThrownBy(() -> Validated.validateKeyVersionNotNull(result2, null, new PfConceptKey()))
+ PfConceptKey conceptKey = new PfConceptKey();
+ assertThatThrownBy(() -> Validated.validateKeyVersionNotNull(result2, null, conceptKey))
.isInstanceOf(NullPointerException.class);
assertThatCode(() -> Validated.validateKeyVersionNotNull(result2, MY_FIELD, null)).doesNotThrowAnyException();