Restructure for authorative models
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaConstraintLogicalTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
 import org.onap.policy.models.base.PfConceptKey;
 import org.onap.policy.models.base.PfReferenceKey;
 import org.onap.policy.models.base.PfValidationResult;
-import org.onap.policy.models.tosca.simple.concepts.ToscaConstraintLogical;
+import org.onap.policy.models.tosca.simple.concepts.JpaToscaConstraintLogical;
 import org.onap.policy.models.tosca.simple.concepts.testconcepts.DummyToscaConstraint;
 
 /**
@@ -38,22 +38,22 @@ import org.onap.policy.models.tosca.simple.concepts.testconcepts.DummyToscaConst
  *
  * @author Liam Fallon (liam.fallon@est.tech)
  */
-public class ToscaConstraintLogicalTest {
+public class JpaToscaConstraintLogicalTest {
 
     @Test
     public void testConstraintLogicalPojo() {
-        assertNotNull(new ToscaConstraintLogical());
-        assertNotNull(new ToscaConstraintLogical(new PfReferenceKey()));
+        assertNotNull(new JpaToscaConstraintLogical());
+        assertNotNull(new JpaToscaConstraintLogical(new PfReferenceKey()));
 
         try {
-            new ToscaConstraintLogical((PfReferenceKey) null);
+            new JpaToscaConstraintLogical((PfReferenceKey) null);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("key is marked @NonNull but is null", exc.getMessage());
         }
 
         try {
-            new ToscaConstraintLogical((ToscaConstraintLogical) null);
+            new JpaToscaConstraintLogical((JpaToscaConstraintLogical) null);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("copyConcept is marked @NonNull but is null", exc.getMessage());
@@ -61,23 +61,23 @@ public class ToscaConstraintLogicalTest {
 
         PfConceptKey tclParentKey = new PfConceptKey("tParentKey", "0.0.1");
         PfReferenceKey tclKey = new PfReferenceKey(tclParentKey, "trigger0");
-        ToscaConstraintLogical tcl = new ToscaConstraintLogical(tclKey, ToscaConstraintLogical.Operation.EQ);
+        JpaToscaConstraintLogical tcl = new JpaToscaConstraintLogical(tclKey, JpaToscaConstraintLogical.Operation.EQ);
 
         try {
-            new ToscaConstraintLogical(tcl);
+            new JpaToscaConstraintLogical(tcl);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("cannot copy an immutable constraint", exc.getMessage());
         }
 
-        ToscaConstraintLogical tclClone1 = new ToscaConstraintLogical();
+        JpaToscaConstraintLogical tclClone1 = new JpaToscaConstraintLogical();
         try {
             tcl.copyTo(tclClone1);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("cannot copy an immutable constraint", exc.getMessage());
         }
-        tclClone1 = new ToscaConstraintLogical(tclKey, ToscaConstraintLogical.Operation.EQ);
+        tclClone1 = new JpaToscaConstraintLogical(tclKey, JpaToscaConstraintLogical.Operation.EQ);
 
         assertEquals(tcl, tclClone1);
         assertEquals(0, tcl.compareTo(tclClone1));
@@ -86,11 +86,12 @@ public class ToscaConstraintLogicalTest {
         assertEquals(0, tcl.compareTo(tcl));
         assertFalse(tcl.compareTo(tcl.getKey()) == 0);
 
-        ToscaConstraintLogical differentTcl =
-                new ToscaConstraintLogical(new PfReferenceKey(), ToscaConstraintLogical.Operation.EQ);
+        JpaToscaConstraintLogical differentTcl =
+                new JpaToscaConstraintLogical(new PfReferenceKey(), JpaToscaConstraintLogical.Operation.EQ);
         assertFalse(tcl.compareTo(differentTcl) == 0);
 
-        ToscaConstraintLogical otherTc = new ToscaConstraintLogical(tclKey, ToscaConstraintLogical.Operation.EQ);
+        JpaToscaConstraintLogical otherTc =
+                new JpaToscaConstraintLogical(tclKey, JpaToscaConstraintLogical.Operation.EQ);
         assertEquals(0, tcl.compareTo(otherTc));
 
         try {
@@ -101,14 +102,14 @@ public class ToscaConstraintLogicalTest {
         }
 
         assertEquals(1, tcl.getKeys().size());
-        assertEquals(1, new ToscaConstraintLogical().getKeys().size());
+        assertEquals(1, new JpaToscaConstraintLogical().getKeys().size());
 
-        ToscaConstraintLogical tclClone0 = new ToscaConstraintLogical();
-        new ToscaConstraintLogical().clean();
+        JpaToscaConstraintLogical tclClone0 = new JpaToscaConstraintLogical();
+        new JpaToscaConstraintLogical().clean();
         tcl.clean();
         assertEquals(tclClone0, tcl);
 
-        assertFalse(new ToscaConstraintLogical().validate(new PfValidationResult()).isValid());
+        assertFalse(new JpaToscaConstraintLogical().validate(new PfValidationResult()).isValid());
         assertTrue(tcl.validate(new PfValidationResult()).isValid());
 
         try {
@@ -127,14 +128,14 @@ public class ToscaConstraintLogicalTest {
         }
 
         try {
-            new DummyToscaConstraint((PfReferenceKey)null);
+            new DummyToscaConstraint((PfReferenceKey) null);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("key is marked @NonNull but is null", exc.getMessage());
         }
 
         try {
-            new DummyToscaConstraint((DummyToscaConstraint)null);
+            new DummyToscaConstraint((DummyToscaConstraint) null);
             fail("test should throw an exception");
         } catch (Exception exc) {
             assertEquals("copyConcept is marked @NonNull but is null", exc.getMessage());