* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams.TopicParamsBuilder;
import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig;
import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpParams;
+@RunWith(MockitoJUnitRunner.class)
public class HttpOperationTest {
private static final IllegalStateException EXPECTED_EXCEPTION = new IllegalStateException("expected exception");
*/
@Before
public void setUp() {
- MockitoAnnotations.initMocks(this);
-
rejectRequest = false;
nget = 0;
npost = 0;
params = ControlLoopOperationParams.builder().actor(ACTOR).operation(OPERATION).requestId(REQ_ID).build();
- outcome = params.makeOutcome(null);
+ outcome = params.makeOutcome();
callback = new AtomicReference<>();
future = new CompletableFuture<>();
/**
* Initializes the configuration.
*
- * @param operator operator to be initialized
* @param clientName name of the client which it should use
*/
private void initConfig(String clientName) {
/**
* Initializes the configuration with a real client.
*
- * @param operator operator to be initialized
* @param clientName name of the client which it should use
*/
private void initConfig(String clientName, HttpClientFactory factory) {
/**
* Initializes the configuration with a real client.
*
- * @param operator operator to be initialized
* @param clientName name of the client which it should use
*/
private void initRealConfig(String clientName) {