[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixes
[policy/engine.git] / ECOMP-PAP-REST / src / test / java / org / openecomp / policy / pap / ia / DbAuditCompareEntriesTest.java
index 6ab3d35..2fef9a7 100644 (file)
@@ -38,7 +38,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.openecomp.policy.common.ia.DbAudit;
 import org.openecomp.policy.common.ia.DbDAO;
@@ -49,7 +48,6 @@ import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity;
 import org.openecomp.policy.common.im.jpa.StateManagementEntity;
 import org.openecomp.policy.jpa.BackUpMonitorEntity;
 
-@Ignore
 public class DbAuditCompareEntriesTest {
 
        private static Log logger = LogFactory.getLog(DbAuditCompareEntriesTest.class);
@@ -123,7 +121,6 @@ public class DbAuditCompareEntriesTest {
         * Tests that a comparison between hashsets is successful if
         * the entries match
         */
-       //@Ignore
        @Test
        public void runAllTests() throws Exception {
                logger.info("runAllTests: Entering");
@@ -152,7 +149,7 @@ public class DbAuditCompareEntriesTest {
                //There is only one entry IntegrityAuditEntity, but we will check anyway
                HashSet<String> classNameSet = dbDAO.getPersistenceClassNames();
                for(String c : classNameSet){
-                       if (c.equals("org.openecomp.policy.common.ia.IntegrityAuditEntity")){
+                       if (c.equals("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity")){
                                className = c;
                        }
                }
@@ -181,8 +178,8 @@ public class DbAuditCompareEntriesTest {
                
                dbAudit.writeAuditDebugLog(className, resourceName1, resourceName2, entry1, entry2);
                
-               HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
-               HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+               HashMap<Object, Object> myEntries = new HashMap<>();
+               HashMap<Object, Object> theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -205,8 +202,8 @@ public class DbAuditCompareEntriesTest {
                 */
                entry2.setDesignated(true);
                                
-               myEntries = new HashMap<Object, Object>();
-               theirEntries = new HashMap<Object, Object>();
+               myEntries = new HashMap<>();
+               theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -240,8 +237,8 @@ public class DbAuditCompareEntriesTest {
                // Clone the first entry
                entry2 = SerializationUtils.clone(entry1);
                
-               HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
-               HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+               HashMap<Object, Object> myEntries = new HashMap<>();
+               HashMap<Object, Object> theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -264,8 +261,8 @@ public class DbAuditCompareEntriesTest {
                 
                entry2.setFlag("flag2");
                                
-               myEntries = new HashMap<Object, Object>();
-               theirEntries = new HashMap<Object, Object>();
+               myEntries = new HashMap<>();
+               theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -300,8 +297,8 @@ public class DbAuditCompareEntriesTest {
                // Clone the first entry
                entry2 = SerializationUtils.clone(entry1);
                
-               HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
-               HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+               HashMap<Object, Object> myEntries = new HashMap<>();
+               HashMap<Object, Object> theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -324,8 +321,8 @@ public class DbAuditCompareEntriesTest {
                 
                entry2.setAdminState("unlocked");
                                
-               myEntries = new HashMap<Object, Object>();
-               theirEntries = new HashMap<Object, Object>();
+               myEntries = new HashMap<>();
+               theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -379,8 +376,8 @@ public class DbAuditCompareEntriesTest {
                 
                entry2.setFpcCount(321L);
                                
-               myEntries = new HashMap<Object, Object>();
-               theirEntries = new HashMap<Object, Object>();
+               myEntries = new HashMap<>();
+               theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -414,8 +411,8 @@ public class DbAuditCompareEntriesTest {
                // Clone the first entry
                entry2 = SerializationUtils.clone(entry1);
                
-               HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
-               HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+               HashMap<Object, Object> myEntries = new HashMap<>();
+               HashMap<Object, Object> theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -436,8 +433,8 @@ public class DbAuditCompareEntriesTest {
                 
                entry2.setSite("site_1a");
                                
-               myEntries = new HashMap<Object, Object>();
-               theirEntries = new HashMap<Object, Object>();
+               myEntries = new HashMap<>();
+               theirEntries = new HashMap<>();
                
                myEntries.put("pdp1", entry1);
                theirEntries.put("pdp1", entry2);
@@ -450,4 +447,4 @@ public class DbAuditCompareEntriesTest {
                assertEquals(1, result.size());
                logger.info("testResourceRegistrationEntity: Exit");
        }
-}
+}
\ No newline at end of file