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.TopicEndpoint;
import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
+@RunWith(MockitoJUnitRunner.class)
public class BidirectionalTopicClientTest {
private static final String SINK_TOPIC = "my-sink-topic";
private static final String SOURCE_TOPIC = "my-source-topic";
*/
@Before
public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
when(sink.send(anyString())).thenReturn(true);
when(sink.getTopicCommInfrastructure()).thenReturn(SINK_INFRA);
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 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 java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
+@RunWith(MockitoJUnitRunner.class)
public class PseudoScheduledFutureTest {
private static final long DELAY_MS = 1000L;
*/
@Before
public void setUp() {
- MockitoAnnotations.initMocks(this);
-
when(work.getDelay()).thenReturn(DELAY_MS);
count = 0;