- Mono<Collection<String>> policyIds = Mono.just(Arrays.asList("policyId1", "policyId2"));
- when(a1ClientMock.getPolicyIdentities(anyString())).thenReturn(policyIds);
- when(a1ClientMock.deletePolicy(anyString(), anyString())).thenReturn(Mono.empty());
- when(a1ClientMock.getPolicyTypeIdentities(anyString())).thenReturn(policyIds);
- when(a1ClientMock.getPolicyType(anyString(), anyString())).thenReturn(Mono.just("schema"));
+ doReturn(policyIds).when(a1ClientMock).getPolicyTypeIdentities();
+ doReturn(policyIds).when(a1ClientMock).getPolicyIdentities();
+ doReturn(Mono.just("schema")).when(a1ClientMock).getPolicyTypeSchema(anyString());
+ doReturn(Mono.just("OK")).when(a1ClientMock).putPolicy(any());
+ doReturn(Flux.empty()).when(a1ClientMock).deleteAllPolicies();
+
+ RepositorySupervision supervisorUnderTest =
+ new RepositorySupervision(rics, policies, a1ClientFactory, types, services);