* ONAP
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import jakarta.ws.rs.client.Invocation.Builder;
+import jakarta.ws.rs.client.WebTarget;
import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.client.WebTarget;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.aai.AaiConstants;
-import org.onap.policy.common.utils.coder.StandardCoderObject;
-import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+@RunWith(MockitoJUnitRunner.class)
public class AaiGetOperationTest extends BasicAaiOperation {
private static final String MY_NAME = "my-operation-name";
private static final String PARAM_NAME = "my-param";
private static final String PARAM_VALUE = "my-value";
- private static final String MY_URL = "my-url";
private AaiGetOperation oper;
verify(bldr).header("hdrB", "valB");
}
- @Test
- public void testPostProcessResponse() throws Exception {
- StandardCoderObject resp = new StandardCoderObject();
- CompletableFuture<OperationOutcome> future2 = oper.postProcessResponse(outcome, MY_URL, null, resp);
-
- assertSame(outcome, future2.get());
- assertSame(resp, context.getProperty("AAI.my-operation-name.my-target"));
- }
-
@Test
public void testGetRetry() {
// use default if null retry