From 03248c4de4197dac33c156e6a7a6538c9943305c Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 3 Mar 2020 21:02:13 -0500 Subject: Add SO VF Module Delete Operation Redesigned the SO Operation classes; moved some code from the subclass to the superclass so it could be reused by the VF Module Delete Operation. JerseyClient does not support DELETE with a request body, so had to implement a delete() method using java11 HttpClient. Fix some issues found while testing with drools-apps. Added "delete" operation to SO simulator. Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn Change-Id: I269fe13cf90c295ec2bbac92bc5a59b3820ea265 --- .../org/onap/policy/controlloop/actor/test/BasicHttpOperation.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models-interactions/model-actors/actor.test/src') diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java index 6228756bd..81156c184 100644 --- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java +++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java @@ -30,6 +30,7 @@ import javax.ws.rs.client.Entity; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.InvocationCallback; import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.mockito.ArgumentCaptor; import org.mockito.Captor; @@ -101,6 +102,8 @@ public class BasicHttpOperation extends BasicOperation { when(rawResponse.getStatus()).thenReturn(200); when(webBuilder.async()).thenReturn(webAsync); + when(webBuilder.accept(any(MediaType.class))).thenReturn(webBuilder); + when(webBuilder.accept(any(String.class))).thenReturn(webBuilder); when(webTarget.request()).thenReturn(webBuilder); when(webTarget.path(any())).thenReturn(webTarget); -- cgit