X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Ftasks%2FStartupServiceTest.java;h=5cfabd9cce56e156d1c4226596d14d9fe9caf5e5;hb=ffe0c150f08205d73ee362f58f492aeb2703f295;hp=8bcda08eb47389d8a829f46bf1da656aea92a433;hpb=50e6a619a2f568f949c02dcd8d6656218d422a93;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/tasks/StartupServiceTest.java b/policy-agent/src/test/java/org/oransc/policyagent/tasks/StartupServiceTest.java index 8bcda08e..5cfabd9c 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/tasks/StartupServiceTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/tasks/StartupServiceTest.java @@ -86,7 +86,8 @@ public class StartupServiceTest { .thenReturn(fluxType1.concatWith(fluxType2)); Flux policies = Flux.just(new String[] {POLICY_ID_1, POLICY_ID_2}); when(a1ClientMock.getPolicyIdentities(anyString())).thenReturn(policies); - when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.empty()); + when(a1ClientMock.getPolicyType(anyString(), anyString())).thenReturn(Mono.just("Schema")); + when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.just("OK")); Rics rics = new Rics(); PolicyTypes policyTypes = new PolicyTypes(); @@ -148,7 +149,8 @@ public class StartupServiceTest { Flux policies = Flux.just(new String[] {POLICY_ID_1, POLICY_ID_2}); doReturn(policies).when(a1ClientMock).getPolicyIdentities(anyString()); - when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.empty()); + when(a1ClientMock.getPolicyType(anyString(), anyString())).thenReturn(Mono.just("Schema")); + when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.just("OK")); Rics rics = new Rics(); PolicyTypes policyTypes = new PolicyTypes(); @@ -175,10 +177,11 @@ public class StartupServiceTest { Flux fluxType2 = Flux.just(POLICY_TYPE_2_NAME); when(a1ClientMock.getPolicyTypeIdentities(anyString())).thenReturn(fluxType1) .thenReturn(fluxType1.concatWith(fluxType2)); + when(a1ClientMock.getPolicyType(anyString(), anyString())).thenReturn(Mono.just("Schema")); Flux policies = Flux.just(new String[] {POLICY_ID_1, POLICY_ID_2}); doReturn(Flux.error(new Exception("Unable to contact ric.")), policies).when(a1ClientMock) .getPolicyIdentities(anyString()); - when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.empty()); + when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.just("OK")); Rics rics = new Rics(); PolicyTypes policyTypes = new PolicyTypes();