package org.opendaylight.openflowplugin.impl.statistics.services.compatibility;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+
import com.google.common.util.concurrent.FutureCallback;
import java.math.BigInteger;
import java.util.Collections;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
import org.mockito.Captor;
-import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.opendaylight.openflowplugin.api.OFConstants;
rqContextStack, deviceContext, notificationPublishService, new AtomicLong(21), convertorManager);
Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
- .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
- Mockito.when(translatorLibrary.lookupTranslator(Matchers.<TranslatorKey>any())).thenReturn(translator);
+ .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
+ Mockito.when(translatorLibrary.lookupTranslator(ArgumentMatchers.<TranslatorKey>any())).thenReturn(translator);
}
@Test(expected = IllegalAccessError.class)
.setNode(createNodeRef("unitProt:123"))
.setTableId(new TableId((short) 1));
- Mockito.when(translator.translate(Matchers.any(MultipartReply.class), Matchers.eq(deviceInfo), Matchers.any()))
+ Mockito.when(translator.translate(any(MultipartReply.class), eq(deviceInfo),any()))
.thenReturn(new AggregatedFlowStatisticsBuilder()
.setByteCount(new Counter64(BigInteger.valueOf(50L)))
.setPacketCount(new Counter64(BigInteger.valueOf(51L)))
Assert.assertEquals(MultipartType.OFPMPAGGREGATE, requestInput.getValue().getType());
Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS))
- .offerNotification(Matchers.any(Notification.class));
+ .offerNotification(any(Notification.class));
}
@Test
Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType());
Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS))
- .offerNotification(Matchers.any(Notification.class));
+ .offerNotification(any(Notification.class));
}
private static RpcResult<Object> buildFlowStatsReply() {
Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType());
Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS))
- .offerNotification(Matchers.any(Notification.class));
+ .offerNotification(any(Notification.class));
}
@Test
Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType());
Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS))
- .offerNotification(Matchers.any(Notification.class));
+ .offerNotification(any(Notification.class));
}
}