package org.opendaylight.openflowplugin.impl.statistics.services;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.ArgumentMatchers.same;
+
import com.google.common.util.concurrent.FutureCallback;
import java.util.Collections;
import java.util.List;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
-import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.stubbing.Answer;
};
Mockito.when(rqContextStack.<List<MultipartReply>>createRequestContext()).thenReturn(rqContextMp);
Mockito.when(translatorLibrary
- .<MultipartReply, AggregatedFlowStatistics>lookupTranslator(Matchers.any(TranslatorKey.class)))
+ .<MultipartReply, AggregatedFlowStatistics>lookupTranslator(Mockito.<TranslatorKey>any()))
.thenReturn(translator);
}
@Test
public void testGetAggregateFlowStatisticsFromFlowTableForGivenMatch() throws Exception {
Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
- .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+ .commitEntry(eq(42L), requestInput.capture(), Mockito.<FutureCallback>any());
Mockito.doAnswer((Answer<Void>) invocation -> {
final MultipartReplyMessageBuilder messageBuilder = new MultipartReplyMessageBuilder()
.setVersion(OFConstants.OFP_VERSION_1_3);
.success(Collections.<MultipartReply>singletonList(messageBuilder.build()))
.build());
return null;
- }).when(multiMsgCollector).endCollecting(Matchers.any(EventIdentifier.class));
+ }).when(multiMsgCollector).endCollecting(Mockito.<EventIdentifier>any());
Mockito.when(translator.translate(
- Matchers.any(MultipartReply.class), Matchers.same(deviceInfo), Matchers.isNull())
+ Mockito.<MultipartReply>any(), same(deviceInfo), isNull())
).thenReturn(new AggregatedFlowStatisticsBuilder().build());
GetAggregateFlowStatisticsFromFlowTableForGivenMatchInputBuilder input =