Move PAP database provider to spring boot default
[policy/pap.git] / main / src / test / java / org / onap / policy / pap / main / rest / TestPolicyAuditManager.java
index b33c0ef..4f844fb 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation.
+ *  Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -52,7 +53,7 @@ public class TestPolicyAuditManager extends ProviderSuper {
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        auditManager = new PolicyAuditManager(dao);
+        auditManager = new PolicyAuditManager(policyAuditService);
     }
 
     @AfterClass
@@ -88,7 +89,7 @@ public class TestPolicyAuditManager extends ProviderSuper {
 
         assertThat(auditManager.getAuditRecords()).hasSize(1);
 
-        doThrow(PfModelRuntimeException.class).when(dao).createAuditRecords(any());
+        doThrow(PfModelRuntimeException.class).when(policyAuditService).createAuditRecords(any());
         auditManager.saveRecordsToDb();
 
         assertThat(auditManager.getAuditRecords()).isNotEmpty();