- public void testPutPolicyValidResponse() {
- when(asyncRestClientMock.put(anyString(), anyString())).thenReturn(Mono.just(POLICY_JSON_VALID));
-
- Mono<String> policyMono = clientUnderTest
- .putPolicy(A1ClientHelper.createPolicy(RIC_URL, POLICY_1_ID, POLICY_JSON_VALID, POLICY_TYPE));
-
- verify(asyncRestClientMock).put(POLICIES_URL + POLICY_1_ID, POLICY_JSON_VALID);
- StepVerifier.create(policyMono).expectNext(POLICY_JSON_VALID).expectComplete().verify();
- }
-
- @Test
- public void testPutPolicyInvalidResponse() {
- when(asyncRestClientMock.put(anyString(), anyString())).thenReturn(Mono.just(POLICY_JSON_INVALID));
+ void testPutPolicyValidResponse() {
+ doReturn(RIC_URL).when(ricConfigMock).baseUrl();
+ when(asyncRestClientMock.put(anyString(), anyString())).thenReturn(Mono.just(POLICY_JSON));