Add extra authorative TOSCA concepts
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / authorative / concepts / ToscaPolicyTypeTest.java
index 59a5a33..75c6b51 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 
 import java.util.LinkedHashMap;
-
 import org.junit.Test;
 
 /**
@@ -38,7 +37,7 @@ public class ToscaPolicyTypeTest {
     public void testToscaPolicyType() {
         assertThatThrownBy(() -> {
             new ToscaPolicyType(null);
-        }).hasMessage("copyObject is marked @NonNull but is null");
+        }).hasMessageMatching("copyObject is marked .*on.*ull but is null");
 
         ToscaPolicyType tpt = new ToscaPolicyType();
         tpt.setName("AType");
@@ -47,7 +46,7 @@ public class ToscaPolicyTypeTest {
         tpt.setDescription("Desc");
 
         ToscaPolicyType clonedTpt0 = new ToscaPolicyType(tpt);
-        assertEquals(0, tpt.compareTo(clonedTpt0));
+        assertEquals(0, new ToscaPolicyTypeComparator().compare(tpt, clonedTpt0));
 
         tpt.setMetadata(new LinkedHashMap<>());
         tpt.setProperties(new LinkedHashMap<>());
@@ -58,6 +57,6 @@ public class ToscaPolicyTypeTest {
         tpt.getProperties().put("Property0", tp);
 
         ToscaPolicyType clonedTpt1 = new ToscaPolicyType(tpt);
-        assertEquals(0, tpt.compareTo(clonedTpt1));
+        assertEquals(0, new ToscaPolicyTypeComparator().compare(tpt, clonedTpt1));
     }
 }