Fix more sonar issues in models: yaml to dao
[policy/models.git] / models-base / src / test / java / org / onap / policy / models / base / PfUtilsTest.java
index 339ee9d..bd55dcd 100644 (file)
@@ -36,13 +36,15 @@ import org.junit.Test;
  */
 public class PfUtilsTest {
 
+    private static final String HELLO = "hello";
+
     @Test
     public void testCompareObjects() {
         assertEquals(0, PfUtils.compareObjects(null, null));
-        assertEquals(-1, PfUtils.compareObjects("hello", null));
-        assertEquals(1, PfUtils.compareObjects(null, "hello"));
-        assertFalse(PfUtils.compareObjects("hello", "goodbye") == 0);
-        assertEquals(0, PfUtils.compareObjects("hello", "hello"));
+        assertEquals(-1, PfUtils.compareObjects(HELLO, null));
+        assertEquals(1, PfUtils.compareObjects(null, HELLO));
+        assertFalse(PfUtils.compareObjects(HELLO, "goodbye") == 0);
+        assertEquals(0, PfUtils.compareObjects(HELLO, HELLO));
     }
 
     @Test