OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal 36/76236/27
authorgobinath <gobinath@ericsson.com>
Wed, 19 Sep 2018 06:05:49 +0000 (11:35 +0530)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 26 Oct 2018 08:36:32 +0000 (04:36 -0400)
This patch bumps:
- odlparent to 4.0.0
- mdsal to 3.0.1

It also deals with:
- odl-guava-23 to odl-guava
- xmlunit upgrade via xmlunit-legacy
- adjust dependencies to account for ietf-{inet,yang}-types movement

Change-Id: I3936130b75afe804195ecb87c46aef46c39a7ed5
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: gobinath <gobinath@ericsson.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Signed-off-by: gobinath <gobinath@ericsson.com>
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
316 files changed:
applications/arbitratorreconciliation/api/pom.xml
applications/arbitratorreconciliation/impl/pom.xml
applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java
applications/arbitratorreconciliation/pom.xml
applications/bulk-o-matic/pom.xml
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowReader.java
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpc.java
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterTxChain.java
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/SalBulkFlowServiceImpl.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterConcurrentTest.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpcTest.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterSequentialTest.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterTxChainTest.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/SalBulkFlowServiceImplTest.java
applications/bulk-o-matic/src/test/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/TableWriterTest.java
applications/device-ownership-service/pom.xml
applications/device-ownership-service/src/main/java/org/opendaylight/openflowplugin/applications/deviceownershipservice/impl/DeviceOwnershipServiceImpl.java
applications/forwardingrules-manager/pom.xml
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/BundleFlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeConnectorInventoryTranslatorImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/util/FrmUtil.java
applications/forwardingrules-manager/src/test/java/org/opendaylight/openflowplugin/applications/frm/impl/DeviceMastershipManagerTest.java
applications/forwardingrules-manager/src/test/java/test/mock/util/FRMTest.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/FlowForwarder.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/PathUtil.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/ForwardingRulesSyncProviderTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedConfigListenerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SimplifiedOperationalListenerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorFutureZipDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorGuardDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorImplTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/SyncReactorRetryDecoratorTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/clustering/DeviceMastershipManagerTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/FlowForwarderTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/GroupForwarderTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/MeterForwarderTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyFlatBatchImplTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImplTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/TableForwarderTest.java
applications/forwardingrules-sync/src/test/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtilTest.java
applications/lldp-speaker/pom.xml
applications/lldp-speaker/src/main/java/org/opendaylight/openflowplugin/applications/lldpspeaker/LLDPSpeaker.java
applications/lldp-speaker/src/test/java/org/opendaylight/openflowplugin/applications/lldpspeaker/LLDPSpeakerTest.java
applications/notification-supplier/pom.xml
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/AbstractNotificationSupplierBase.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/NodeConnectorNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/NodeNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/GroupNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/MeterNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowStatNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImpl.java
applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImpl.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/NodeConnectorNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/NodeNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/helper/TestSupplierVerifyHelper.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/FlowNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/GroupNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/MeterNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowStatNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/FlowTableStatNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/GroupStatNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/MeterStatNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/NodeConnectorStatNotificationSupplierImplTest.java
applications/notification-supplier/src/test/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/stat/QueueStatNotificationSupplierImplTest.java
applications/of-switch-config-pusher/pom.xml
applications/of-switch-config-pusher/src/main/java/org/opendaylight/openflowplugin/openflow/ofswitch/config/DefaultConfigPusher.java
applications/of-switch-config-pusher/src/test/java/org/opendaylight/openflowplugin/openflow/ofswitch/config/DefaultConfigPusherTest.java
applications/reconciliation-framework/pom.xml
applications/southbound-cli/pom.xml
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/ReconciliationServiceImpl.java
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/util/ShellUtil.java
applications/table-miss-enforcer/pom.xml
applications/table-miss-enforcer/src/main/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPPacketPuntEnforcer.java
applications/table-miss-enforcer/src/test/java/org/opendaylight/openflowplugin/applications/tablemissenforcer/LLDPDataTreeChangeListenerTest.java
applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/utils/LLDPDiscoveryUtils.java
applications/topology-lldp-discovery/src/test/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAgerTest.java
applications/topology-lldp-discovery/src/test/java/org/opendaylight/openflowplugin/applications/topology/lldp/utils/LLDPDiscoveryUtilsTest.java
applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableNodeMapping.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/DataTreeChangeListenerBase.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/NodeChangeListenerImplTest.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TerminationPointChangeListenerImplTest.java
applications/topology-manager/src/test/java/org/opendaylight/openflowplugin/applications/topology/manager/TestUtils.java
artifacts/pom.xml
distribution/karaf/pom.xml
drop-test-karaf/pom.xml
extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml
extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml
extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml
extension/features-extension-aggregator/pom.xml
extension/openflowjava-extension-nicira-api/pom.xml
extension/openflowjava-extension-nicira/pom.xml
extension/openflowjava-extension-nicira/src/main/java/org/opendaylight/openflowjava/nx/codec/action/LearnCodecUtil.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/NiciraExtensionCodecRegistratorImplTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/NiciraExtensionsRegistratorTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/RegLoad2CodecTest.java
extension/openflowplugin-extension-api/pom.xml
extension/openflowplugin-extension-nicira/src/main/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/RegConvertor.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/NiciraExtensionProviderTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/action/CtClearConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/action/DecNshTtlConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/action/RegMoveConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpOpConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpShaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpSpaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpThaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/ArpTpaConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtStateConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/CtZoneConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthSrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/EthTypeConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NshFlagsConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NshMdtypeConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NshNpConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NshTtlConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc1ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc2ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc3ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/Nshc4ConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NsiConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/NspConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TcpSrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4DstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIPv4SrcConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/TunIdConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpDstConvertorTest.java
extension/openflowplugin-extension-nicira/src/test/java/org/opendaylight/openflowplugin/extension/vendor/nicira/convertor/match/UdpSrcConvertorTest.java
extension/openflowplugin-extension-onf/pom.xml
extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/deserializer/BundleControlFactoryTest.java
extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/serializer/BundleAddMessageFactoryTest.java
extension/openflowplugin-extension-onf/src/test/java/org/opendaylight/openflowplugin/extension/onf/serializer/BundleControlFactoryTest.java
extension/pom.xml
extension/test-extension/pom.xml
features-aggregator/features-openflowplugin/pom.xml
features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml
features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml
features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml
features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml
features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml
features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml
features-aggregator/odl-openflowplugin-app-notifications/pom.xml
features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml
features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml
features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml
features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml
features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml
features-aggregator/odl-openflowplugin-app-topology/pom.xml
features-aggregator/odl-openflowplugin-drop-test/pom.xml
features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml
features-aggregator/odl-openflowplugin-flow-services/pom.xml
features-aggregator/odl-openflowplugin-libraries/pom.xml
features-aggregator/odl-openflowplugin-libraries/src/main/feature/feature.xml
features-aggregator/odl-openflowplugin-nsf-model/pom.xml
features-aggregator/odl-openflowplugin-southbound/pom.xml
features-aggregator/pom.xml
libraries/liblldp/pom.xml
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/BitBufferHelper.java
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/LLDP.java
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/LLDPTLV.java
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/NetUtils.java
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/Packet.java
model/pom.xml
openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml
openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml
openflowjava/features-openflowjava-aggregator/pom.xml
openflowjava/openflow-protocol-api/pom.xml
openflowjava/openflow-protocol-impl/pom.xml
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ErrorMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10ErrorMessageFactory.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/DelegatingInboundHandlerTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/IdleHandlerTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/OFDecoderStatisticsTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/OFDecoderTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/OFEncoderStatisticsTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/OFEncoderTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/PublishingChannelInitializerTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ConnectionAdapterImplTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/BarrierReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ErrorMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ExperimenterMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/VendorMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/multipart/MultipartReplyExperimenterTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/multipart/OF10StatsReplyExperimenterTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/ExperimenterInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/VendorInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/MultipartRequestExperimenterTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/MultipartRequestTableFeaturesTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/multipart/OF10StatsRequestExperimenterTest.java
openflowjava/openflow-protocol-it/pom.xml
openflowjava/openflow-protocol-spi/pom.xml
openflowjava/openflowjava-blueprint-config/pom.xml
openflowjava/openflowjava-util/pom.xml
openflowplugin-blueprint-config/pom.xml
openflowplugin-common/pom.xml
openflowplugin-impl/pom.xml
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImpl.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/OpenFlowPluginProviderImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/ConnectionManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/HandshakeManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/listener/HandshakeListenerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/listener/OpenflowProtocolListenerInitialImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/listener/SystemNotificationsListenerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/PacketInRateLimiterTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/TransactionChainManagerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/initialization/OF10DeviceInitializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/initialization/OF13DeviceInitializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/listener/OpenflowProtocolListenerFullImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsComandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesComandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/lifecycle/ContextChainHolderImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/lifecycle/ContextChainImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/DeviceFlowRegistryImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactoryTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/role/RoleContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/MultipartRequestCallbackTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/MultipartRequestOnTheFlyCallbackTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/ServiceMocking.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalAsyncConfigServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalBundleServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalEchoServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalExperimenterMessageServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalExperimenterMpMessageServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlatBatchServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowsBatchServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupsBatchServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalMeterServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalMetersBatchServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalTableServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/util/RequestContextUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImpMockInitiation.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtilsTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractSingleStatsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/AbstractStatsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightFlowStatisticsServiceImpl1Test.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightFlowStatisticsServiceImpl2Test.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightFlowTableStatisticsServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightMeterStatisticsServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightPortStatisticsServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightQueueStatisticsServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/AbstractCompatibleStatServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/dedicated/StatisticsGatheringOnTheFlyServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/GroupDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/MeterDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/NodeConnectorDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/GroupDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/MeterDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/NodeConnectorDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/QueueDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/FlowRemovedTranslatorTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/PacketReceivedTranslatorTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/translator/PortUpdateTranslatorTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/BarrierUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/DeviceInitializationUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistrationUtilsTest.java
openflowplugin-it/pom.xml
openflowplugin/pom.xml
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/ActionResponseConvertor.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ActionExtensionHelperTest.java
parent/pom.xml
samples/learning-switch/pom.xml
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/FlowUtils.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/InstanceIdentifierUtils.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/LearningSwitchHandlerSimpleImpl.java
samples/pom.xml
samples/sample-bundles/pom.xml
samples/sample-consumer/pom.xml
samples/simple-client/pom.xml
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ListeningSimpleClient.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ScenarioHandler.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/SendEvent.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/SimpleClient.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/SimpleClientHandler.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/SleepEvent.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/UdpSimpleClient.java
test-common/pom.xml
test-common/src/main/java/org/opendaylight/openflowplugin/testcommon/AbstractDropTest.java
test-provider/pom.xml
test-provider/src/main/java/org/opendaylight/openflowplugin/test/FlowEventListenerLoggingImpl.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/NodeErrorListenerLoggingImpl.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestNodeConnectorNotification.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestServiceProvider.java

index be36b8c6717b96fd4f51dc5c2758bbb9cf810f2a..849aea841e769251d2b8e3ec9608685ea63a93b2 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>applications</artifactId>
         <groupId>org.opendaylight.openflowplugin</groupId>
@@ -43,4 +41,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
index 35bac9f93c4caaa1448f8e6663e76144daf773bf..014ab20c958e02c3929af7bb4698cad9b8ea03ab 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>applications</artifactId>
         <groupId>org.opendaylight.openflowplugin</groupId>
@@ -40,4 +38,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
index cbf75d6f8a188e05ad975f387d1bad3b676c5adb..17e1cecf6a5ababfffac4a2143321e7b098fc188 100644 (file)
@@ -258,7 +258,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS
         public Boolean call() {
             InstanceIdentifier<FlowCapableNode> nodeIdentity = deviceInfo.getNodeInstanceIdentifier()
                     .augmentation(FlowCapableNode.class);
-            String node = nodeIdentity.firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+            String node = nodeIdentity.firstKeyOf(Node.class).getId().getValue();
             BundleId bundleIdValue = new BundleId(BUNDLE_ID.getAndIncrement());
             LOG.debug("Triggering arbitrator reconciliation for device :{}", node);
             final NodeRef nodeRef = new NodeRef(nodeIdentity.firstIdentifierOf(Node.class));
index b42138fb3c49300635bb0160ac9eddbf755ebe97..8ed0eb76c5e696252b7235fd7692e3be9e466b79 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>applications</artifactId>
         <groupId>org.opendaylight.openflowplugin</groupId>
@@ -39,4 +37,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
index 90bf9b2b01e655c97cead3a270195dd60030449f..49e840866d1c9810cdd1adb4467a234389ed84e4 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
-<project
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.openflowplugin</groupId>
index 9968f4e0b1bb44583d4d002b1a0ef9b1b08ecafd..4b9ff5761f1a1a9f0cbbb6388bae5b8a5ce33253 100644 (file)
@@ -101,7 +101,7 @@ public final class FlowReader implements Runnable, FlowCounterMBean {
                     }
                 } catch (ReadFailedException e) {
                     readOpStatus.set(FlowCounter.OperationStatus.FAILURE.status());
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Error {}", e);
                 }
             }
         }
index ab68cf9555322e48ef1423b10de800af735b8020..b3471d4b8cfcfabb2b6e808d900b3493b8036349 100644 (file)
@@ -148,7 +148,7 @@ public class FlowWriterDirectOFRpc {
 
                         TimeUnit.MILLISECONDS.sleep(PAUSE_BETWEEN_BATCH_MILLIS);
                     } catch (InterruptedException iEx) {
-                        LOG.error("Interrupted while pausing after batched push upto {}. Ex {}", i, iEx);
+                        LOG.error("Interrupted while pausing after batched push upto {} Ex ", i, iEx);
                     }
                 }
             }
index b7fa18230cb0aea8070cd6ad5abb3791b7b6141b..09a0329a9d3b875d444863f6d4932f631dc6d11e 100644 (file)
@@ -164,7 +164,7 @@ public class FlowWriterTxChain implements FlowCounterMBean {
         @Override
         public void onTransactionChainFailed(TransactionChain<?, ?> transactionChain,
                 AsyncTransaction<?, ?> asyncTransaction, Throwable throwable) {
-            LOG.error("Transaction chain: {} FAILED at asyncTransaction: {} due to: {}", transactionChain,
+            LOG.error("Transaction chain: {} FAILED at asyncTransaction: {} due to: ", transactionChain,
                     asyncTransaction.getIdentifier(), throwable);
             transactionChain.close();
         }
index 8a6a629e21aa5eb7d59d5d4f8df27fe81ac949c3..70c259a399b3c5c93f2a291c6aa6d50aaac87acd 100644 (file)
@@ -216,7 +216,7 @@ public class SalBulkFlowServiceImpl implements SalBulkFlowService {
         } catch (MalformedObjectNameException | InstanceAlreadyExistsException | MBeanRegistrationException
                 | NotCompliantMBeanException e) {
             rpcResultBuilder = RpcResultBuilder.failed();
-            LOG.warn("Exception occurred: {} ", e.getMessage(), e);
+            LOG.warn("Exception occurred: {} ", e);
         }
         return Futures.immediateFuture(rpcResultBuilder.build());
     }
index b1370385f2ffb441477f9027cb0a7c3e3003b3fe..124a98c0b4462a6b07a07a787b37de7cf7e8d0ed 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.ExecutorService;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -57,7 +57,7 @@ public class FlowWriterConcurrentTest {
         Mockito.doAnswer(invocation -> {
             ((Runnable) invocation.getArguments()[0]).run();
             return null;
-        }).when(mockFlowPusher).execute(Matchers.<Runnable>any());
+        }).when(mockFlowPusher).execute(ArgumentMatchers.<Runnable>any());
 
         flowWriterConcurrent = new FlowWriterConcurrent(mockDataBroker, mockFlowPusher);
     }
@@ -65,14 +65,16 @@ public class FlowWriterConcurrentTest {
     @Test
     public void testAddFlows() throws Exception {
         flowWriterConcurrent.addFlows(1, FLOWS_PER_DPN, 10, 10, 10, (short) 0, (short) 1, true);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any(), Matchers.<DataObject>any(), Matchers.anyBoolean());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(ArgumentMatchers.<LogicalDatastoreType>any(),
+                ArgumentMatchers.<InstanceIdentifier<DataObject>>any(), ArgumentMatchers.<DataObject>any(),
+                ArgumentMatchers.anyBoolean());
     }
 
     @Test
     public void testDeleteFlows() throws Exception {
         flowWriterConcurrent.deleteFlows(1, FLOWS_PER_DPN, 10, (short) 0, (short) 1);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).delete(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN))
+                .delete(ArgumentMatchers.<LogicalDatastoreType>any(),
+                        ArgumentMatchers.<InstanceIdentifier<DataObject>>any());
     }
 }
index 4c0cd569672b0aa303f3709856e3d2eb465227d2..2cda1ad5b2b808c640057bf80a786df449d28ef6 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.applications.bulk.o.matic;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
 
@@ -20,7 +20,7 @@ import java.util.concurrent.ExecutorService;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -81,7 +81,7 @@ public class FlowWriterDirectOFRpcTest {
         Mockito.doAnswer(invocation -> {
             ((Runnable)invocation.getArguments()[0]).run();
             return null;
-        }).when(mockFlowPusher).execute(Matchers.<Runnable>any());
+        }).when(mockFlowPusher).execute(ArgumentMatchers.<Runnable>any());
 
         flowWriterDirectOFRpc = new FlowWriterDirectOFRpc(mockDataBroker, mockSalFlowService, mockFlowPusher);
     }
index 8fa73e936586375e89de58146aa7e237cf8b3470..780fc4adb0115174b726b867f6365a5eb8cf3d33 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.ExecutorService;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -54,7 +54,7 @@ public class FlowWriterSequentialTest {
         Mockito.doAnswer(invocation -> {
             ((Runnable) invocation.getArguments()[0]).run();
             return null;
-        }).when(mockFlowPusher).execute(Matchers.<Runnable>any());
+        }).when(mockFlowPusher).execute(ArgumentMatchers.<Runnable>any());
 
         flowWriterSequential = new FlowWriterSequential(mockDataBroker, mockFlowPusher);
     }
@@ -62,14 +62,16 @@ public class FlowWriterSequentialTest {
     @Test
     public void testAddFlows() throws Exception {
         flowWriterSequential.addFlows(1, FLOWS_PER_DPN, 10, 10, (short) 0, (short) 1, true);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any(), Matchers.<DataObject>any(), Matchers.anyBoolean());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(ArgumentMatchers.<LogicalDatastoreType>any(),
+                ArgumentMatchers.<InstanceIdentifier<DataObject>>any(), ArgumentMatchers.<DataObject>any(),
+                ArgumentMatchers.anyBoolean());
     }
 
     @Test
     public void testDeleteFlows() throws Exception {
         flowWriterSequential.deleteFlows(1, FLOWS_PER_DPN, 10, (short) 0, (short) 1);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).delete(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN))
+                .delete(ArgumentMatchers.<LogicalDatastoreType>any(),
+                        ArgumentMatchers.<InstanceIdentifier<DataObject>>any());
     }
 }
index 0bda86c799d9ec935fa5288ba96f9c176a6310fc..d1cd249c8747925b83d29cda7eea9e8a5b2bc931 100644 (file)
@@ -17,7 +17,7 @@ import java.util.concurrent.ExecutorService;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -55,11 +55,12 @@ public class FlowWriterTxChainTest {
         Mockito.doAnswer(invocation -> {
             ((Runnable) invocation.getArguments()[0]).run();
             return null;
-        }).when(mockFlowPusher).execute(Matchers.<Runnable>any());
+        }).when(mockFlowPusher).execute(ArgumentMatchers.<Runnable>any());
 
         final BindingTransactionChain mockedTxChain = mock(BindingTransactionChain.class);
         when(mockedTxChain.newWriteOnlyTransaction()).thenReturn(writeTransaction);
-        doReturn(mockedTxChain).when(mockDataBroker).createTransactionChain(Matchers.<TransactionChainListener>any());
+        doReturn(mockedTxChain).when(mockDataBroker)
+                .createTransactionChain(ArgumentMatchers.<TransactionChainListener>any());
 
         when(writeTransaction.submit()).thenReturn(Futures.immediateCheckedFuture(null));
 
@@ -69,14 +70,16 @@ public class FlowWriterTxChainTest {
     @Test
     public void testAddFlows() throws Exception {
         flowWriterTxChain.addFlows(1, FLOWS_PER_DPN, 10, 10, 10, (short) 0, (short) 1, true);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any(), Matchers.<DataObject>any(), Matchers.anyBoolean());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).put(ArgumentMatchers.<LogicalDatastoreType>any(),
+                ArgumentMatchers.<InstanceIdentifier<DataObject>>any(), ArgumentMatchers.<DataObject>any(),
+                ArgumentMatchers.anyBoolean());
     }
 
     @Test
     public void testDeleteFlows() throws Exception {
         flowWriterTxChain.deleteFlows(1, FLOWS_PER_DPN, 10, (short) 0, (short) 1);
-        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN)).delete(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any());
+        Mockito.verify(writeTransaction, Mockito.times(FLOWS_PER_DPN))
+                .delete(ArgumentMatchers.<LogicalDatastoreType>any(),
+                        ArgumentMatchers.<InstanceIdentifier<DataObject>>any());
     }
 }
index f1491ed29c469a56904766d06d01335a064d8e6e..f68501acdf564618864a1a688b5b9bdeb03bbd90 100644 (file)
@@ -22,8 +22,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -101,7 +101,8 @@ public class SalBulkFlowServiceImplTest {
     public void setUp() throws Exception {
         when(mockDataBroker.newWriteOnlyTransaction()).thenReturn(writeTransaction);
         when(mockDataBroker.newReadOnlyTransaction()).thenReturn(readOnlyTransaction);
-        when(readOnlyTransaction.read(Mockito.any(LogicalDatastoreType.class), Mockito.<InstanceIdentifier<Node>>any()))
+        Mockito.lenient().when(readOnlyTransaction.read(Mockito.any(LogicalDatastoreType.class),
+                Mockito.<InstanceIdentifier<Node>>any()))
                 .thenReturn(Futures.immediateCheckedFuture(Optional.of(mockNode)));
         salBulkFlowService = new SalBulkFlowServiceImpl(mockSalFlowService, mockDataBroker);
     }
@@ -127,7 +128,8 @@ public class SalBulkFlowServiceImplTest {
         salBulkFlowService.addFlowsDs(addFlowsDsInput);
 
         verify(writeTransaction).submit();
-        verify(writeTransaction).put(Matchers.<LogicalDatastoreType>any(), Matchers.<InstanceIdentifier<Flow>>any(),
+        verify(writeTransaction).put(ArgumentMatchers.<LogicalDatastoreType>any(),
+                ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
                 flowArgumentCaptor.capture(), Mockito.anyBoolean());
 
         Flow flow = flowArgumentCaptor.getValue();
@@ -140,16 +142,17 @@ public class SalBulkFlowServiceImplTest {
         final RemoveFlowsDsInput removeFlowsDsInput = removeFlowsDsInputBuilder.build();
 
         salBulkFlowService.removeFlowsDs(removeFlowsDsInput);
-        verify(writeTransaction).delete(Matchers.<LogicalDatastoreType>any(), Matchers.<InstanceIdentifier<Flow>>any());
+        verify(writeTransaction).delete(ArgumentMatchers.<LogicalDatastoreType>any(),
+                ArgumentMatchers.<InstanceIdentifier<Flow>>any());
         verify(writeTransaction, times(2)).submit();
     }
 
     @Test
     public void testAddRemoveFlowsRpc() throws Exception {
-        Mockito.when(mockSalFlowService.addFlow(Matchers.<AddFlowInput>any()))
+        Mockito.when(mockSalFlowService.addFlow(ArgumentMatchers.<AddFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddFlowOutputBuilder().build()).buildFuture());
 
-        Mockito.when(mockSalFlowService.removeFlow(Matchers.<RemoveFlowInput>any()))
+        Mockito.when(mockSalFlowService.removeFlow(ArgumentMatchers.<RemoveFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveFlowOutputBuilder().build()).buildFuture());
 
         final BulkFlowItemBuilder bulkFlowItemBuilder = new BulkFlowItemBuilder();
@@ -166,7 +169,7 @@ public class SalBulkFlowServiceImplTest {
         final AddFlowsRpcInput addFlowsRpcInput = addFlowsRpcInputBuilder.build();
         salBulkFlowService.addFlowsRpc(addFlowsRpcInput);
 
-        verify(mockSalFlowService).addFlow(Matchers.<AddFlowInput>any());
+        verify(mockSalFlowService).addFlow(ArgumentMatchers.<AddFlowInput>any());
 
         final RemoveFlowsRpcInputBuilder removeFlowsRpcInputBuilder = new RemoveFlowsRpcInputBuilder();
         removeFlowsRpcInputBuilder.setBulkFlowItem(bulkFlowItems);
@@ -174,7 +177,7 @@ public class SalBulkFlowServiceImplTest {
         final RemoveFlowsRpcInput removeFlowsRpcInput = removeFlowsRpcInputBuilder.build();
         salBulkFlowService.removeFlowsRpc(removeFlowsRpcInput);
 
-        verify(mockSalFlowService).removeFlow(Matchers.<RemoveFlowInput>any());
+        verify(mockSalFlowService).removeFlow(ArgumentMatchers.<RemoveFlowInput>any());
     }
 
     @Test
index 2192ba4ba6ca574c02272e33d0a014d3a012dbd0..5ca5a582065a4d5930b483f3daab133018253099 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.ExecutorService;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -57,7 +57,7 @@ public class TableWriterTest {
         Mockito.doAnswer(invocation -> {
             ((Runnable) invocation.getArguments()[0]).run();
             return null;
-        }).when(mockTablePusher).execute(Matchers.<Runnable>any());
+        }).when(mockTablePusher).execute(ArgumentMatchers.<Runnable>any());
 
         tableWriter = new TableWriter(mockDataBroker, mockTablePusher);
     }
@@ -65,14 +65,17 @@ public class TableWriterTest {
     @Test
     public void testAddTables() throws Exception {
         tableWriter.addTables(DPN_COUNT, START_TABLE_ID, END_TABLE_ID);
-        Mockito.verify(writeTransaction, Mockito.times(TABLES_PER_DPN)).put(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any(), Matchers.<DataObject>any(), Matchers.anyBoolean());
+        Mockito.verify(writeTransaction, Mockito.times(TABLES_PER_DPN))
+                .put(ArgumentMatchers.<LogicalDatastoreType>any(),
+                        ArgumentMatchers.<InstanceIdentifier<DataObject>>any(), ArgumentMatchers.<DataObject>any(),
+                        ArgumentMatchers.anyBoolean());
     }
 
     @Test
     public void testDeleteTables() throws Exception {
         tableWriter.deleteTables(DPN_COUNT, START_TABLE_ID, END_TABLE_ID);
-        Mockito.verify(writeTransaction, Mockito.times(TABLES_PER_DPN)).delete(Matchers.<LogicalDatastoreType>any(),
-                Matchers.<InstanceIdentifier<DataObject>>any());
+        Mockito.verify(writeTransaction, Mockito.times(TABLES_PER_DPN))
+                .delete(ArgumentMatchers.<LogicalDatastoreType>any(),
+                        ArgumentMatchers.<InstanceIdentifier<DataObject>>any());
     }
 }
index 7c37972e17444196dfc1bccd5aedf44b3ce53e58..cfaf5729c44f3ee45d981d1e6e3a12184b81d906 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>applications</artifactId>
         <groupId>org.opendaylight.openflowplugin</groupId>
@@ -19,4 +17,4 @@
             <artifactId>mdsal-eos-binding-api</artifactId>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 33111d5902d67b3e3073604426f1d619ffeceffa..e58c91134f7e2fbbaecdc8f6e7777c371c7df9c1 100644 (file)
@@ -7,8 +7,9 @@
  */
 package org.opendaylight.openflowplugin.applications.deviceownershipservice.impl;
 
-import com.google.common.base.Optional;
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.regex.Pattern;
@@ -22,7 +23,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class DeviceOwnershipServiceImpl implements DeviceOwnershipService, EntityOwnershipListener {
-    private static final Logger LOG = LoggerFactory.getLogger(DeviceOwnershipService.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DeviceOwnershipServiceImpl.class);
     private static final String SERVICE_ENTITY_TYPE = "org.opendaylight.mdsal.ServiceEntityType";
     private static final Pattern NODE_ID_PATTERN = Pattern.compile("^openflow:\\d+");
 
index 57f253a0cb0249232fb98427a4b7b7f1461f8b61..aabf9e4274bce273c6f118aed39df00129400288 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.openflowplugin</groupId>
index a3cca7e5759dc6d1e53fee3986349292975dac25..2a9ce1041ba2533c6629858f3a606b7dd5ecdd78 100644 (file)
@@ -40,7 +40,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesOutput;
@@ -81,7 +80,7 @@ public class BundleFlowForwarder {
     public void remove(final InstanceIdentifier<Flow> identifier, final Flow flow,
             final InstanceIdentifier<FlowCapableNode> nodeIdent, final BundleId bundleId) {
         final List<Message> messages = new ArrayList<>(1);
-        String node = nodeIdent.firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+        String node = nodeIdent.firstKeyOf(Node.class).getId().getValue();
         BundleInnerMessage bundleInnerMessage = new BundleRemoveFlowCaseBuilder()
                 .setRemoveFlowCaseData(new RemoveFlowCaseDataBuilder(flow).build()).build();
         Message message = new MessageBuilder().setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)))
index b9ac9d3d15c5c3fd165c052d267bba8c37171dee..8c7009a0fb299b1b7d02cb48ba852683f85da7fb 100644 (file)
@@ -121,7 +121,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
     public void remove(final InstanceIdentifier<Flow> identifier, final Flow removeDataObj,
             final InstanceIdentifier<FlowCapableNode> nodeIdent) {
 
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, removeDataObj)) {
             BundleId bundleId = getActiveBundle(nodeIdent, provider);
             if (bundleId != null) {
@@ -151,7 +151,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
             final Flow removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
 
         Future<RpcResult<RemoveFlowOutput>> resultFuture = SettableFuture.create();
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, removeDataObj)) {
             final RemoveFlowInputBuilder builder = new RemoveFlowInputBuilder(removeDataObj);
             builder.setFlowRef(new FlowRef(identifier));
@@ -173,7 +173,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
     public void update(final InstanceIdentifier<Flow> identifier, final Flow original, final Flow update,
             final InstanceIdentifier<FlowCapableNode> nodeIdent) {
 
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, update)) {
             BundleId bundleId = getActiveBundle(nodeIdent, provider);
             if (bundleId != null) {
@@ -227,7 +227,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
     public Future<? extends RpcResult<?>> add(final InstanceIdentifier<Flow> identifier, final Flow addDataObj,
             final InstanceIdentifier<FlowCapableNode> nodeIdent) {
 
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, addDataObj)) {
             BundleId bundleId = getActiveBundle(nodeIdent, provider);
             if (bundleId != null) {
index affc74c8c94d847374bc65ac35eabba9edfc13bc..811fdfc367a714ddf92c4fe14a479dce674f1f18 100644 (file)
@@ -22,7 +22,6 @@ import org.opendaylight.openflowplugin.common.wait.SimpleTaskRetryLooper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -88,7 +87,7 @@ public class FlowNodeConnectorInventoryTranslatorImpl extends AbstractNodeConnec
             InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent) {
         if (compareInstanceIdentifierTail(identifier, II_TO_FLOW_CAPABLE_NODE_CONNECTOR)) {
             LOG.debug("Node Connector removed");
-            String nodeConnectorIdentifier = nodeConnIdent.firstKeyOf(NodeConnector.class, NodeConnectorKey.class)
+            String nodeConnectorIdentifier = nodeConnIdent.firstKeyOf(NodeConnector.class)
                     .getId().getValue();
             BigInteger dpId = getDpIdFromPortName(nodeConnectorIdentifier);
 
@@ -111,7 +110,7 @@ public class FlowNodeConnectorInventoryTranslatorImpl extends AbstractNodeConnec
         if (compareInstanceIdentifierTail(identifier, II_TO_FLOW_CAPABLE_NODE_CONNECTOR)) {
             LOG.debug("Node Connector added");
             String nodeConnectorIdentifier = nodeConnIdent
-                    .firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue();
+                    .firstKeyOf(NodeConnector.class).getId().getValue();
             BigInteger dpId = getDpIdFromPortName(nodeConnectorIdentifier);
 
             if (!dpnToPortMultiMap.containsEntry(dpId, nodeConnectorIdentifier)) {
index 51838769c731ccc9b11b51a3513f6385e90817d1..c4e9ad8b726980fa60d30512b4e312df3f88f1e1 100644 (file)
@@ -68,7 +68,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInputBuilder;
@@ -176,7 +175,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
         @Override
         public Boolean call() {
-            String node = nodeIdentity.firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+            String node = nodeIdentity.firstKeyOf(Node.class).getId().getValue();
             Optional<FlowCapableNode> flowNode = Optional.absent();
             BundleId bundleIdValue = new BundleId(BUNDLE_ID.getAndIncrement());
             BigInteger dpnId = getDpnIdFromNodeName(node);
@@ -310,7 +309,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
         @Override
         public Boolean call() {
-            String node = nodeIdentity.firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+            String node = nodeIdentity.firstKeyOf(Node.class).getId().getValue();
             BigInteger dpnId = getDpnIdFromNodeName(node);
 
             ReadOnlyTransaction trans = provider.getReadTranaction();
@@ -734,7 +733,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
         if (flowNode.get().getGroup() != null) {
             for (Group gr : flowNode.get().getGroup()) {
-                NodeId nodeId = nodeRef.getValue().firstKeyOf(Node.class, NodeKey.class).getId();
+                NodeId nodeId = nodeRef.getValue().firstKeyOf(Node.class).getId();
                 provider.getDevicesGroupRegistry().storeGroup(nodeId,gr.getGroupId().getValue());
                 messages.add(new MessageBuilder().setNode(nodeRef).setBundleInnerMessage(new BundleAddGroupCaseBuilder()
                         .setAddGroupCaseData(new AddGroupCaseDataBuilder(gr).build()).build()).build());
index cf79da8a73ae7f60d7ed57b97ae3c1a6b29a0207..6a89273799dbf2ae325e3e73dba470dbb70c9e59 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
@@ -50,15 +49,15 @@ public final class FrmUtil {
     }
 
     public static NodeId getNodeIdFromNodeIdentifier(final InstanceIdentifier<FlowCapableNode> nodeIdent) {
-        return nodeIdent.firstKeyOf(Node.class, NodeKey.class).getId();
+        return nodeIdent.firstKeyOf(Node.class).getId();
     }
 
     public static String getFlowId(final FlowRef flowRef) {
-        return flowRef.getValue().firstKeyOf(Flow.class, FlowKey.class).getId().getValue();
+        return flowRef.getValue().firstKeyOf(Flow.class).getId().getValue();
     }
 
     public static BigInteger getDpnIdFromNodeName(final InstanceIdentifier<FlowCapableNode> nodeIdent) {
-        String nodeId = nodeIdent.firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+        String nodeId = nodeIdent.firstKeyOf(Node.class).getId().getValue();
         String dpId = nodeId.substring(nodeId.lastIndexOf(SEPARATOR) + 1);
         return new BigInteger(dpId);
     }
index c4d509d6bd8cff29e65a12272bd5a6705c9fa72c..55de43760c581205d832cd4dcaadb67c28ebbccb 100644 (file)
@@ -12,7 +12,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -54,7 +54,8 @@ public class DeviceMastershipManagerTest {
         deviceMastershipManager = new DeviceMastershipManager(clusterSingletonService, reconciliationAgent, dataBroker,
                 mastershipChangeServiceManager);
         deviceMastershipManager.setRoutedRpcReg(routedRpcReg);
-        Mockito.when(clusterSingletonService.registerClusterSingletonService(Matchers.<ClusterSingletonService>any()))
+        Mockito.lenient().when(clusterSingletonService
+                .registerClusterSingletonService(ArgumentMatchers.<ClusterSingletonService>any()))
                 .thenReturn(registration);
         Mockito.when(deviceInfo.getNodeId()).thenReturn(nodeId);
         Mockito.when(nodeId.getValue()).thenReturn("dummyValue");
index acaf9fe1e0beddc61f9ef7101df95c68fbcd1b45..02bcd1ee5411c7615be7168dafc47307c32e2768 100644 (file)
@@ -84,17 +84,17 @@ public abstract class FRMTest extends AbstractDataBrokerTest {
         Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
         });
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("disable-reconciliation"), Mockito.any()))
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("disable-reconciliation"), Mockito.any()))
                 .thenReturn(config.isDisableReconciliation());
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("stale-marking-enabled"), Mockito.any()))
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("stale-marking-enabled"), Mockito.any()))
                 .thenReturn(config.isStaleMarkingEnabled());
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("reconciliation-retry-count"), Mockito.any()))
-                .thenReturn(config.getReconciliationRetryCount());
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("reconciliation-retry-count"),
+                Mockito.any())).thenReturn(config.getReconciliationRetryCount());
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("bundle-based-reconciliation-enabled"), Mockito.any()))
-                .thenReturn(config.isBundleBasedReconciliationEnabled());
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("bundle-based-reconciliation-enabled"),
+                Mockito.any())).thenReturn(config.isBundleBasedReconciliationEnabled());
 
         return configurationService;
     }
index 3381b0ac2cc6212a9edf02da5f1b40610148f370..e97d83587cfcb5ebc1cbbb386ce75b1759b72bee 100644 (file)
@@ -56,7 +56,7 @@ public class FlowForwarder implements ForwardingRulesCommitter<Flow, AddFlowOutp
         LOG.trace("Forwarding Flow REMOVE request Tbl id, node Id {} {}",
                 identifier, nodeIdent);
 
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, removeDataObj)) {
             final RemoveFlowInputBuilder builder = new RemoveFlowInputBuilder(removeDataObj);
             builder.setFlowRef(new FlowRef(identifier));
@@ -81,7 +81,7 @@ public class FlowForwarder implements ForwardingRulesCommitter<Flow, AddFlowOutp
                 identifier, nodeIdent, update);
 
         final Future<RpcResult<UpdateFlowOutput>> output;
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, update)) {
             final UpdateFlowInputBuilder builder = new UpdateFlowInputBuilder();
 
@@ -110,7 +110,7 @@ public class FlowForwarder implements ForwardingRulesCommitter<Flow, AddFlowOutp
                 identifier, nodeIdent, addDataObj);
 
         final Future<RpcResult<AddFlowOutput>> output;
-        final TableKey tableKey = identifier.firstKeyOf(Table.class, TableKey.class);
+        final TableKey tableKey = identifier.firstKeyOf(Table.class);
         if (tableIdValidationPrecondition(tableKey, addDataObj)) {
             final AddFlowInputBuilder builder = new AddFlowInputBuilder(addDataObj);
 
index b6e984229f5e6a115bb768fff0ce0f3fe0bb52f0..73db39c900e3a73e16307954aafa3542b60d7383 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.openflowplugin.applications.frsync.util;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
@@ -24,7 +23,7 @@ public final class PathUtil {
     }
 
     public static NodeId digNodeId(final InstanceIdentifier<?> nodeIdent) {
-        return nodeIdent.firstKeyOf(Node.class, NodeKey.class).getId();
+        return nodeIdent.firstKeyOf(Node.class).getId();
     }
 
     public static InstanceIdentifier<Node> digNodePath(final InstanceIdentifier<FlowCapableNode> nodeIdent) {
index e771a54d2937bd7d6cad8339bb4e1bea4925ce92..ff9f903ec3e4191a8fcd54065f30d1029e226114 100644 (file)
@@ -11,7 +11,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -41,7 +41,7 @@ public class ForwardingRulesSyncProviderTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(rpcRegistry.getRpcService(Matchers.<Class<? extends RpcService>>any()))
+        Mockito.when(rpcRegistry.getRpcService(ArgumentMatchers.<Class<? extends RpcService>>any()))
                 .thenAnswer(invocation -> {
                     Class<? extends RpcService> serviceType =
                             (Class<? extends RpcService>) invocation.getArguments()[0];
@@ -58,8 +58,8 @@ public class ForwardingRulesSyncProviderTest {
         provider.init();
 
         Mockito.verify(dataBroker, Mockito.times(2)).registerDataTreeChangeListener(
-                Matchers.<DataTreeIdentifier<FlowCapableNode>>any(),
-                Matchers.<DataTreeChangeListener<FlowCapableNode>>any());
+                ArgumentMatchers.<DataTreeIdentifier<FlowCapableNode>>any(),
+                ArgumentMatchers.<DataTreeChangeListener<FlowCapableNode>>any());
     }
 
     @After
index ebea7768eec283848f42696a7c754643fa7455cf..6c7c4b3fba6f74385b458bf52f455c76184ff83f 100644 (file)
@@ -15,7 +15,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -145,8 +145,8 @@ public class SimplifiedConfigListenerTest {
         Mockito.when(roTx.read(LogicalDatastoreType.OPERATIONAL, fcNodePath))
                 .thenReturn(Futures.immediateCheckedFuture(Optional.of(dataBefore)));
         final SyncupEntry syncupEntry = new SyncupEntry(after, dsTypeAfter, before, dsTypeBefore);
-        Mockito.when(reactor.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(syncupEntry)))
-                .thenReturn(Futures.immediateFuture(Boolean.TRUE));
+        Mockito.when(reactor.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                Mockito.eq(syncupEntry))).thenReturn(Futures.immediateFuture(Boolean.TRUE));
         return syncupEntry;
     }
 
index 9ba97bfa13b212f5f01b37ff19fa31fd991c3a1f..fec3204045cd2edf87db43133dfae0e9e038181c 100644 (file)
@@ -18,7 +18,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -289,8 +289,8 @@ public class SimplifiedOperationalListenerTest {
         Mockito.when(roTx.read(LogicalDatastoreType.CONFIGURATION, fcNodePath))
                 .thenReturn(Futures.immediateCheckedFuture(Optional.of(configNode)));
         final SyncupEntry syncupEntry = new SyncupEntry(after, dsTypeAfter, before, dsTypeBefore);
-        Mockito.when(reactor.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(syncupEntry)))
-                .thenReturn(Futures.immediateFuture(Boolean.TRUE));
+        Mockito.when(reactor.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                Mockito.eq(syncupEntry))).thenReturn(Futures.immediateFuture(Boolean.TRUE));
         return syncupEntry;
     }
 }
index 77505176d175fa9ba36eb94b1b591a38c009776e..875aaf9284432959b37c750a3205bead3af9ddcc 100644 (file)
@@ -23,8 +23,8 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.ArgumentMatchers;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -87,7 +87,7 @@ public class SyncReactorFutureZipDecoratorTest {
         final SyncupEntry zipped = new SyncupEntry(dataAfter2, configDS, dataBefore, configDS);
         final List<ListenableFuture<Boolean>> allResults = new ArrayList<>();
 
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
                 .thenAnswer(invocationOnMock -> {
                     LOG.info("unlocking next configs");
                     latchForNext.countDown();
@@ -131,7 +131,7 @@ public class SyncReactorFutureZipDecoratorTest {
         final SyncupEntry first = new SyncupEntry(dataBefore, configDS, null, configDS);
         final SyncupEntry second = new SyncupEntry(dataAfter, configDS, dataBefore, configDS);
 
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
                 .thenAnswer(invocationOnMock -> {
                     LOG.info("unlocking next config");
                     latchForNext.countDown();
@@ -166,7 +166,7 @@ public class SyncReactorFutureZipDecoratorTest {
         final SyncupEntry first = new SyncupEntry(configAfter, configDS, configBefore, configDS);
         final SyncupEntry second = new SyncupEntry(configActual, configDS, freshOperational, operationalDS);
 
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(first)))
                 .thenAnswer(invocationOnMock -> {
                     LOG.info("unlocking for fresh operational");
                     latchForNext.countDown();
@@ -192,7 +192,7 @@ public class SyncReactorFutureZipDecoratorTest {
     }
 
     private void mockSyncupWithEntry(final SyncupEntry entry) {
-        Mockito.when(delegate.syncup(Matchers.any(), Mockito.eq(entry)))
+        Mockito.when(delegate.syncup(ArgumentMatchers.any(), Mockito.eq(entry)))
                 .thenReturn(Futures.immediateFuture(Boolean.TRUE));
     }
 
index 54609323e485a07962c7b7c4a6307136cb564ec8..8724c531747e97796864554b493a7b4ad36c6078 100644 (file)
@@ -12,7 +12,7 @@ import com.google.common.util.concurrent.Futures;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -52,13 +52,13 @@ public class SyncReactorGuardDecoratorTest {
         fcNodePath = nodePath.augmentation(FlowCapableNode.class);
 
         final Node operationalNode = Mockito.mock(Node.class);
-        Mockito.when(operationalNode.getId()).thenReturn(NODE_ID);
-        Mockito.when(operationalNode.augmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode);
+        Mockito.lenient().when(operationalNode.getId()).thenReturn(NODE_ID);
+        Mockito.lenient().when(operationalNode.augmentation(FlowCapableNode.class)).thenReturn(fcOperationalNode);
     }
 
     @Test
     public void testSyncupSuccess() {
-        Mockito.when(delegate.syncup(Matchers.any(), Matchers.any()))
+        Mockito.when(delegate.syncup(ArgumentMatchers.any(), ArgumentMatchers.any()))
                 .thenReturn(Futures.immediateFuture(Boolean.TRUE));
 
         reactor.syncup(fcNodePath, syncupEntry);
@@ -69,7 +69,7 @@ public class SyncReactorGuardDecoratorTest {
 
     @Test
     public void testSyncupFail() {
-        Mockito.when(delegate.syncup(Matchers.any(), Matchers.any()))
+        Mockito.when(delegate.syncup(ArgumentMatchers.any(), ArgumentMatchers.any()))
                 .thenReturn(Futures.immediateFailedFuture(new Exception()));
 
         reactor.syncup(fcNodePath, syncupEntry);
index dd0886a793b743f50549287418732c59d424f20a..48a43a2e467fb6198a4838b82fb674417e21c005 100644 (file)
@@ -16,8 +16,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -106,9 +106,9 @@ public class SyncReactorImplTest {
                                                         operationalFcn, LogicalDatastoreType.OPERATIONAL);
 
         Mockito.when(syncPlanPushStrategy.executeSyncStrategy(
-                Matchers.<ListenableFuture<RpcResult<Void>>>any(),
-                Matchers.<SynchronizationDiffInput>any(),
-                Matchers.<SyncCrudCounters>any()))
+                ArgumentMatchers.<ListenableFuture<RpcResult<Void>>>any(),
+                ArgumentMatchers.<SynchronizationDiffInput>any(),
+                ArgumentMatchers.<SyncCrudCounters>any()))
                 .thenReturn(RpcResultBuilder.<Void>success().buildFuture());
 
         final ListenableFuture<Boolean> syncupResult = reactor.syncup(NODE_IDENT, syncupEntry);
@@ -117,9 +117,9 @@ public class SyncReactorImplTest {
         Assert.assertTrue(voidRpcResult);
 
         Mockito.verify(syncPlanPushStrategy).executeSyncStrategy(
-                Matchers.<ListenableFuture<RpcResult<Void>>>any(),
+                ArgumentMatchers.<ListenableFuture<RpcResult<Void>>>any(),
                 syncDiffInputCaptor.capture(),
-                Matchers.<SyncCrudCounters>any());
+                ArgumentMatchers.<SyncCrudCounters>any());
 
         final SynchronizationDiffInput diffInput = syncDiffInputCaptor.getValue();
         Assert.assertEquals(1, ReconcileUtil.countTotalPushed(diffInput.getFlowsToAddOrUpdate().values()));
index 70147bc3da12ab7bab748f71c4dca5246eb60d8f..78ad23040282675362c364a25f864408be7f0920 100644 (file)
@@ -12,7 +12,7 @@ import com.google.common.util.concurrent.Futures;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -53,8 +53,8 @@ public class SyncReactorRetryDecoratorTest {
 
     @Test
     public void testSyncupSuccess() {
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Matchers.<SyncupEntry>any()))
-                .thenReturn(Futures.immediateFuture(Boolean.TRUE));
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                ArgumentMatchers.<SyncupEntry>any())).thenReturn(Futures.immediateFuture(Boolean.TRUE));
 
         reactor.syncup(fcNodePath, syncupEntry);
 
@@ -65,8 +65,8 @@ public class SyncReactorRetryDecoratorTest {
 
     @Test
     public void testSyncupFail() {
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Matchers.<SyncupEntry>any()))
-                .thenReturn(Futures.immediateFuture(Boolean.FALSE));
+        Mockito.when(delegate.syncup(ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any(),
+                ArgumentMatchers.<SyncupEntry>any())).thenReturn(Futures.immediateFuture(Boolean.FALSE));
 
         reactor.syncup(fcNodePath, syncupEntry);
 
index bf0096ebe73c556f419e0f3bc20d7e2842f1a2e9..11a4da7c8a3ab305556da49c9010cf77a7062d08 100644 (file)
@@ -12,7 +12,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -37,7 +37,8 @@ public class DeviceMastershipManagerTest {
     @Before
     public void setUp() throws Exception {
         deviceMastershipManager = new DeviceMastershipManager(clusterSingletonService, new ReconciliationRegistry());
-        Mockito.when(clusterSingletonService.registerClusterSingletonService(Matchers.<ClusterSingletonService>any()))
+        Mockito.when(clusterSingletonService
+                .registerClusterSingletonService(ArgumentMatchers.<ClusterSingletonService>any()))
                 .thenReturn(registration);
     }
 
index 61ce84ee9dd36d7b867bef68e1e98c68703dc639..1fb2ed51222d123220a6cc7ca6e0f5550df28157 100644 (file)
@@ -17,8 +17,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -110,7 +110,7 @@ public class FlowForwarderTest {
 
         final Future<RpcResult<AddFlowOutput>> addResult = flowForwarder.add(flowPath, flow, flowCapableNodePath);
 
-        Mockito.verify(salFlowService).addFlow(Matchers.<AddFlowInput>any());
+        Mockito.verify(salFlowService).addFlow(ArgumentMatchers.<AddFlowInput>any());
         final AddFlowInput flowInput = addFlowInputCpt.getValue();
         Assert.assertEquals(2, flowInput.getTableId().shortValue());
         Assert.assertEquals(emptyMatch, flowInput.getMatch());
@@ -155,7 +155,7 @@ public class FlowForwarderTest {
         final Future<RpcResult<UpdateFlowOutput>> updateResult = flowForwarder.update(flowPath, flow,
                 flowUpdated, flowCapableNodePath);
 
-        Mockito.verify(salFlowService).updateFlow(Matchers.<UpdateFlowInput>any());
+        Mockito.verify(salFlowService).updateFlow(ArgumentMatchers.<UpdateFlowInput>any());
         final UpdateFlowInput updateFlowInput = updateFlowInputCpt.getValue();
         final OriginalFlow flowOrigInput = updateFlowInput.getOriginalFlow();
         final UpdatedFlow flowInput = updateFlowInput.getUpdatedFlow();
@@ -192,7 +192,7 @@ public class FlowForwarderTest {
         final Future<RpcResult<RemoveFlowOutput>> removeResult = flowForwarder.remove(flowPath,
                 removeFlow, flowCapableNodePath);
 
-        Mockito.verify(salFlowService).removeFlow(Matchers.<RemoveFlowInput>any());
+        Mockito.verify(salFlowService).removeFlow(ArgumentMatchers.<RemoveFlowInput>any());
         final RemoveFlowInput flowInput = removeFlowInputCpt.getValue();
         Assert.assertEquals(2, flowInput.getTableId().shortValue());
         Assert.assertEquals(emptyMatch, flowInput.getMatch());
index 1d26c584c9cd5672b782a6d6b9ce1b633d2b41fd..3a5bc5dae13e30221241918952104433bce2fe4b 100644 (file)
@@ -16,8 +16,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -100,7 +100,7 @@ public class GroupForwarderTest {
         final Future<RpcResult<RemoveGroupOutput>> addResult =
                 groupForwarder.remove(groupPath, group, flowCapableNodePath);
 
-        Mockito.verify(salGroupService).removeGroup(Matchers.<RemoveGroupInput>any());
+        Mockito.verify(salGroupService).removeGroup(ArgumentMatchers.<RemoveGroupInput>any());
 
         Assert.assertTrue(addResult.isDone());
         final RpcResult<RemoveGroupOutput> result = addResult.get(2, TimeUnit.SECONDS);
@@ -133,7 +133,7 @@ public class GroupForwarderTest {
         final Future<RpcResult<UpdateGroupOutput>> addResult =
                 groupForwarder.update(groupPath, groupOriginal, groupUpdate, flowCapableNodePath);
 
-        Mockito.verify(salGroupService).updateGroup(Matchers.<UpdateGroupInput>any());
+        Mockito.verify(salGroupService).updateGroup(ArgumentMatchers.<UpdateGroupInput>any());
 
         Assert.assertTrue(addResult.isDone());
         final RpcResult<UpdateGroupOutput> result = addResult.get(2, TimeUnit.SECONDS);
@@ -163,7 +163,7 @@ public class GroupForwarderTest {
 
         final Future<RpcResult<AddGroupOutput>> addResult = groupForwarder.add(groupPath, group, flowCapableNodePath);
 
-        Mockito.verify(salGroupService).addGroup(Matchers.<AddGroupInput>any());
+        Mockito.verify(salGroupService).addGroup(ArgumentMatchers.<AddGroupInput>any());
 
         Assert.assertTrue(addResult.isDone());
         final RpcResult<AddGroupOutput> result = addResult.get(2, TimeUnit.SECONDS);
index 0109aa13f3723f6ebbddedc09a75c87d99ffed1a..31f6dd51f5044622fd46f0b02ab1b9cf0c8182ee 100644 (file)
@@ -16,8 +16,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -97,7 +97,7 @@ public class MeterForwarderTest {
 
         final Future<RpcResult<RemoveMeterOutput>> removeResult =
                 meterForwarder.remove(meterPath, removeMeter, flowCapableNodePath);
-        Mockito.verify(salMeterService).removeMeter(Matchers.<RemoveMeterInput>any());
+        Mockito.verify(salMeterService).removeMeter(ArgumentMatchers.<RemoveMeterInput>any());
 
         Assert.assertTrue(removeResult.isDone());
         final RpcResult<RemoveMeterOutput> meterResult = removeResult.get(2, TimeUnit.SECONDS);
@@ -127,7 +127,7 @@ public class MeterForwarderTest {
         final Future<RpcResult<UpdateMeterOutput>> updateResult =
                 meterForwarder.update(meterPath, meterOriginal, meterUpdate,
                 flowCapableNodePath);
-        Mockito.verify(salMeterService).updateMeter(Matchers.<UpdateMeterInput>any());
+        Mockito.verify(salMeterService).updateMeter(ArgumentMatchers.<UpdateMeterInput>any());
 
         Assert.assertTrue(updateResult.isDone());
         final RpcResult<UpdateMeterOutput> meterResult = updateResult.get(2, TimeUnit.SECONDS);
@@ -152,7 +152,7 @@ public class MeterForwarderTest {
         );
 
         final Future<RpcResult<AddMeterOutput>> addResult = meterForwarder.add(meterPath, meter, flowCapableNodePath);
-        Mockito.verify(salMeterService).addMeter(Matchers.<AddMeterInput>any());
+        Mockito.verify(salMeterService).addMeter(ArgumentMatchers.<AddMeterInput>any());
 
         Assert.assertTrue(addResult.isDone());
         final RpcResult<AddMeterOutput> meterResult = addResult.get(2, TimeUnit.SECONDS);
index fef5aa02eb7399d6de6d3d4bf36e944876d72031..82c750c3fb5f6085d8865d4bc8d0d1fc96861c2a 100644 (file)
@@ -20,8 +20,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -123,7 +123,7 @@ public class SyncPlanPushStrategyFlatBatchImplTest {
                 groupsToAddOrUpdate, metersToAddOrUpdate, flowsToAddOrUpdate,
                 flowsToRemove, metersToRemove, groupsToRemove);
 
-        Mockito.when(flatBatchService.processFlatBatch(Matchers.<ProcessFlatBatchInput>any()))
+        Mockito.when(flatBatchService.processFlatBatch(ArgumentMatchers.<ProcessFlatBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new ProcessFlatBatchOutputBuilder().build()).buildFuture());
 
         final SyncCrudCounters counters = new SyncCrudCounters();
index 346cb9e0fceb86ea316db3718c92819ab331a8e7..12cb05445c175060e2abababfc55f63d28ffaa19 100644 (file)
@@ -21,9 +21,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -138,24 +138,27 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         final ListenableFuture<RpcResult<Void>> rpcResult = syncPlanPushStrategy.executeSyncStrategy(
                 RpcResultBuilder.<Void>success().buildFuture(), diffInput, syncCounters);
 
-        Mockito.verify(groupCommitter, Mockito.times(6)).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(groupCommitter, Mockito.times(3)).update(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.<Group>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(groupCommitter, Mockito.times(6)).remove(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(flowCommitter, Mockito.times(6)).add(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(flowCommitter, Mockito.times(3)).update(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.<Flow>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(flowCommitter, Mockito.times(6)).remove(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(meterCommitter, Mockito.times(3)).add(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(meterCommitter, Mockito.times(3)).update(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.<Meter>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
-        Mockito.verify(meterCommitter, Mockito.times(3)).remove(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(groupCommitter, Mockito.times(6)).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(groupCommitter, Mockito.times(3)).update(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.<Group>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(groupCommitter, Mockito.times(6)).remove(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(flowCommitter, Mockito.times(6)).add(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(flowCommitter, Mockito.times(3)).update(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.<Flow>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(flowCommitter, Mockito.times(6)).remove(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(meterCommitter, Mockito.times(3)).add(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(meterCommitter, Mockito.times(3)).update(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.<Meter>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
+        Mockito.verify(meterCommitter, Mockito.times(3)).remove(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
 
         Assert.assertTrue(rpcResult.isDone());
         Assert.assertTrue(rpcResult.get().isSuccessful());
@@ -175,42 +178,43 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(flowCapableTxService.sendBarrier(Matchers.<SendBarrierInput>any()))
+        Mockito.when(flowCapableTxService.sendBarrier(ArgumentMatchers.<SendBarrierInput>any()))
                 .thenReturn(RpcResultBuilder.success((SendBarrierOutput) null).buildFuture());
 
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(groupCommitter).add(
-                Matchers.<InstanceIdentifier<Group>>any(), Matchers.<Group>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Group>>any(), ArgumentMatchers.<Group>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(groupCommitter).update(
-                Matchers.<InstanceIdentifier<Group>>any(), Matchers.<Group>any(), Matchers.<Group>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Group>>any(), ArgumentMatchers.<Group>any(),
+                ArgumentMatchers.<Group>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(groupCommitter).remove(
-                Matchers.<InstanceIdentifier<Group>>any(), Matchers.<Group>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Group>>any(), ArgumentMatchers.<Group>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
 
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(flowCommitter).add(
-                Matchers.<InstanceIdentifier<Flow>>any(), Matchers.<Flow>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Flow>>any(), ArgumentMatchers.<Flow>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(flowCommitter).update(
-                Matchers.<InstanceIdentifier<Flow>>any(), Matchers.<Flow>any(), Matchers.<Flow>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Flow>>any(), ArgumentMatchers.<Flow>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(flowCommitter).remove(
-                Matchers.<InstanceIdentifier<Flow>>any(), Matchers.<Flow>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Flow>>any(), ArgumentMatchers.<Flow>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
 
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(meterCommitter).add(
-                Matchers.<InstanceIdentifier<Meter>>any(), Matchers.<Meter>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Meter>>any(), ArgumentMatchers.<Meter>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(meterCommitter).update(
-                Matchers.<InstanceIdentifier<Meter>>any(), Matchers.<Meter>any(), Matchers.<Meter>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Meter>>any(), ArgumentMatchers.<Meter>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(meterCommitter).remove(
-                Matchers.<InstanceIdentifier<Meter>>any(), Matchers.<Meter>any(),
-                Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<Meter>>any(), ArgumentMatchers.<Meter>any(),
+                ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
 
         Mockito.doAnswer(createSalServiceFutureAnswer()).when(tableCommitter).update(
-                Matchers.<InstanceIdentifier<TableFeatures>>any(), Matchers.<TableFeatures>any(),
-                Matchers.<TableFeatures>any(), Matchers.<InstanceIdentifier<FlowCapableNode>>any());
+                ArgumentMatchers.<InstanceIdentifier<TableFeatures>>any(), ArgumentMatchers.<TableFeatures>any(),
+                ArgumentMatchers.<TableFeatures>any(), ArgumentMatchers.<InstanceIdentifier<FlowCapableNode>>any());
 
         syncPlanPushStrategy = new SyncPlanPushStrategyIncrementalImpl()
                 .setMeterForwarder(meterCommitter)
@@ -228,8 +232,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testAddMissingFlows() throws Exception {
-        Mockito.when(flowCommitter.add(Matchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(flowCommitter.add(ArgumentMatchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddFlowOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Flow> flowBox = new ItemSyncBox<>();
@@ -251,8 +255,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         Assert.assertEquals("f4", flowCaptorAllValues.get(1).getId().getValue());
 
         final InOrder inOrderFlow = Mockito.inOrder(flowCapableTxService, flowCommitter);
-        inOrderFlow.verify(flowCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.eq(NODE_IDENT));
+        inOrderFlow.verify(flowCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.eq(NODE_IDENT));
         //TODO: uncomment when enabled in impl
 //        inOrderFlow.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
         inOrderFlow.verifyNoMoreInteractions();
@@ -260,8 +264,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testRemoveRedundantFlows() throws Exception {
-        Mockito.when(flowCommitter.remove(Matchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(flowCommitter.remove(ArgumentMatchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new RemoveFlowOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Flow> flowBox = new ItemSyncBox<>();
@@ -283,22 +287,22 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         Assert.assertEquals("f4", flowCaptorAllValues.get(1).getId().getValue());
 
         final InOrder inOrderFlow = Mockito.inOrder(flowCapableTxService, flowCommitter);
-        inOrderFlow.verify(flowCommitter, Mockito.times(2)).remove(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.eq(NODE_IDENT));
-        inOrderFlow.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderFlow.verify(flowCommitter, Mockito.times(2)).remove(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderFlow.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         inOrderFlow.verifyNoMoreInteractions();
     }
 
 
     @Test
     public void testAddMissingFlows_withUpdate() throws Exception {
-        Mockito.when(flowCommitter.add(Matchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(flowCommitter.add(ArgumentMatchers.<InstanceIdentifier<Flow>>any(), flowCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddFlowOutputBuilder().build()).buildFuture());
 
-        Mockito.when(flowCommitter.update(Matchers.<InstanceIdentifier<Flow>>any(),
+        Mockito.when(flowCommitter.update(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
                 flowUpdateCaptor.capture(), flowUpdateCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new UpdateFlowOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Flow> flowBox = new ItemSyncBox<>();
@@ -330,11 +334,11 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
         final InOrder inOrderFlow = Mockito.inOrder(flowCapableTxService, flowCommitter);
         // add f3, f4
-        inOrderFlow.verify(flowCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.eq(NODE_IDENT));
+        inOrderFlow.verify(flowCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.eq(NODE_IDENT));
         // update f1
-        inOrderFlow.verify(flowCommitter).update(Matchers.<InstanceIdentifier<Flow>>any(),
-                Matchers.<Flow>any(), Matchers.<Flow>any(), Matchers.eq(NODE_IDENT));
+        inOrderFlow.verify(flowCommitter).update(ArgumentMatchers.<InstanceIdentifier<Flow>>any(),
+                ArgumentMatchers.<Flow>any(), ArgumentMatchers.<Flow>any(), ArgumentMatchers.eq(NODE_IDENT));
         //TODO: uncomment when enabled in impl
 //        inOrderFlow.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
 
@@ -343,8 +347,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testAddMissingMeters() throws Exception {
-        Mockito.when(meterCommitter.add(Matchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(meterCommitter.add(ArgumentMatchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddMeterOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Meter> meterSyncBox = new ItemSyncBox<>();
@@ -363,8 +367,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         Assert.assertEquals(4L, metercaptorAllValues.get(1).getMeterId().getValue().longValue());
 
         final InOrder inOrderMeter = Mockito.inOrder(flowCapableTxService, meterCommitter);
-        inOrderMeter.verify(meterCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.eq(NODE_IDENT));
+        inOrderMeter.verify(meterCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.eq(NODE_IDENT));
         //TODO: uncomment when enabled in impl
 //        inOrderMeter.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
         inOrderMeter.verifyNoMoreInteractions();
@@ -372,12 +376,12 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testAddMissingMeters_withUpdate() throws Exception {
-        Mockito.when(meterCommitter.add(Matchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(meterCommitter.add(ArgumentMatchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddMeterOutputBuilder().build()).buildFuture());
 
-        Mockito.when(meterCommitter.update(Matchers.<InstanceIdentifier<Meter>>any(),
-                meterUpdateCaptor.capture(), meterUpdateCaptor.capture(), Matchers.same(NODE_IDENT)))
+        Mockito.when(meterCommitter.update(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                meterUpdateCaptor.capture(), meterUpdateCaptor.capture(), ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new UpdateMeterOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Meter> meterSyncBox = new ItemSyncBox<>();
@@ -404,10 +408,10 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         Assert.assertEquals(1L, meterUpdateCaptorAllValues.get(1).getMeterId().getValue().longValue());
 
         final InOrder inOrderMeters = Mockito.inOrder(flowCapableTxService, meterCommitter);
-        inOrderMeters.verify(meterCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.eq(NODE_IDENT));
-        inOrderMeters.verify(meterCommitter).update(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.<Meter>any(), Matchers.eq(NODE_IDENT));
+        inOrderMeters.verify(meterCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderMeters.verify(meterCommitter).update(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.<Meter>any(), ArgumentMatchers.eq(NODE_IDENT));
         //TODO: uncomment when enabled in impl
 //        inOrderMeters.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
 
@@ -416,8 +420,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testRemoveRedundantMeters() throws Exception {
-        Mockito.when(meterCommitter.remove(Matchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(meterCommitter.remove(ArgumentMatchers.<InstanceIdentifier<Meter>>any(), meterCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new RemoveMeterOutputBuilder().build()).buildFuture());
 
         final ItemSyncBox<Meter> meterSyncBox = new ItemSyncBox<>();
@@ -438,8 +442,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         Assert.assertEquals(4L, metercaptorAllValues.get(1).getMeterId().getValue().longValue());
 
         final InOrder inOrderMeter = Mockito.inOrder(flowCapableTxService, meterCommitter);
-        inOrderMeter.verify(meterCommitter, Mockito.times(2)).remove(Matchers.<InstanceIdentifier<Meter>>any(),
-                Matchers.<Meter>any(), Matchers.eq(NODE_IDENT));
+        inOrderMeter.verify(meterCommitter, Mockito.times(2)).remove(ArgumentMatchers.<InstanceIdentifier<Meter>>any(),
+                ArgumentMatchers.<Meter>any(), ArgumentMatchers.eq(NODE_IDENT));
         //TODO: uncomment when enabled in impl
 //        inOrderMeter.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
         inOrderMeter.verifyNoMoreInteractions();
@@ -447,8 +451,8 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
     @Test
     public void testAddMissingGroups() throws Exception {
-        Mockito.when(groupCommitter.add(Matchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(groupCommitter.add(ArgumentMatchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddGroupOutputBuilder().build()).buildFuture());
 
         ItemSyncBox<Group> groupBox1 = new ItemSyncBox<>();
@@ -478,30 +482,30 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
         final InOrder inOrderGroups = Mockito.inOrder(flowCapableTxService, groupCommitter);
         // add 2
-        inOrderGroups.verify(groupCommitter).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         // add 3, 4
-        inOrderGroups.verify(groupCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         // add 5
-        inOrderGroups.verify(groupCommitter).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
 
         inOrderGroups.verifyNoMoreInteractions();
     }
 
     @Test
     public void testAddMissingGroups_withUpdate() throws Exception {
-        Mockito.when(groupCommitter.add(Matchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(groupCommitter.add(ArgumentMatchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new AddGroupOutputBuilder().build()).buildFuture());
 
-        Mockito.when(groupCommitter.update(Matchers.<InstanceIdentifier<Group>>any(),
+        Mockito.when(groupCommitter.update(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
                 groupUpdateCaptor.capture(), groupUpdateCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new UpdateGroupOutputBuilder().build()).buildFuture());
 
         ItemSyncBox<Group> groupBox1 = new ItemSyncBox<>();
@@ -538,28 +542,28 @@ public class SyncPlanPushStrategyIncrementalImplTest {
         final InOrder inOrderGroups = Mockito.inOrder(flowCapableTxService, groupCommitter);
 
         // add 2, update 1
-        inOrderGroups.verify(groupCommitter).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(groupCommitter).update(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(groupCommitter).update(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
 
         // add 3, 4
-        inOrderGroups.verify(groupCommitter, Mockito.times(2)).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter, Mockito.times(2)).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         // add 5
-        inOrderGroups.verify(groupCommitter).add(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroups.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroups.verify(groupCommitter).add(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroups.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
 
         inOrderGroups.verifyNoMoreInteractions();
     }
 
     @Test
     public void testRemoveRedundantGroups() throws Exception {
-        Mockito.when(groupCommitter.remove(Matchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.when(groupCommitter.remove(ArgumentMatchers.<InstanceIdentifier<Group>>any(), groupCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new RemoveGroupOutputBuilder().build()).buildFuture());
 
         ItemSyncBox<Group> groupBox1 = new ItemSyncBox<>();
@@ -590,26 +594,26 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 
         final InOrder inOrderGroup = Mockito.inOrder(flowCapableTxService, groupCommitter);
         // remove 5
-        inOrderGroup.verify(groupCommitter).remove(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroup.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroup.verify(groupCommitter).remove(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroup.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         // remove 3, 4
-        inOrderGroup.verify(groupCommitter, Mockito.times(2)).remove(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroup.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroup.verify(groupCommitter, Mockito.times(2)).remove(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroup.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         // remove 2
-        inOrderGroup.verify(groupCommitter).remove(Matchers.<InstanceIdentifier<Group>>any(),
-                Matchers.<Group>any(), Matchers.eq(NODE_IDENT));
-        inOrderGroup.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrderGroup.verify(groupCommitter).remove(ArgumentMatchers.<InstanceIdentifier<Group>>any(),
+                ArgumentMatchers.<Group>any(), ArgumentMatchers.eq(NODE_IDENT));
+        inOrderGroup.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
 
         inOrderGroup.verifyNoMoreInteractions();
     }
 
     @Test
     public void testUpdateTableFeatures() throws Exception {
-        Mockito.when(tableCommitter.update(Matchers.<InstanceIdentifier<TableFeatures>>any(),
-                Matchers.isNull(TableFeatures.class), tableFeaturesCaptor.capture(),
-                Matchers.same(NODE_IDENT)))
+        Mockito.lenient().when(tableCommitter.update(ArgumentMatchers.<InstanceIdentifier<TableFeatures>>any(),
+                ArgumentMatchers.isNull(TableFeatures.class), tableFeaturesCaptor.capture(),
+                ArgumentMatchers.same(NODE_IDENT)))
                 .thenReturn(RpcResultBuilder.success(new UpdateTableOutputBuilder().build()).buildFuture());
 
         final FlowCapableNode operational = new FlowCapableNodeBuilder()
@@ -634,6 +638,6 @@ public class SyncPlanPushStrategyIncrementalImplTest {
 //        Assert.assertEquals("test table features", groupCaptorAllValues.get(0).getName());
 //        Assert.assertEquals(1, groupCaptorAllValues.get(0).getTableId().intValue());
 
-        Mockito.verify(flowCapableTxService).sendBarrier(Matchers.<SendBarrierInput>any());
+        Mockito.verify(flowCapableTxService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 }
index 31c472c64faf3c1be23372c0502e5971f93ad51f..e4a9a10fbceb701dab93a862196e25d6cf5bca1d 100644 (file)
@@ -16,8 +16,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -97,7 +97,7 @@ public class TableForwarderTest {
         final Future<RpcResult<UpdateTableOutput>> updateResult = tableForwarder.update(
                 tableFeaturesPath, tableFeatures, tableFeaturesUpdate, flowCapableNodePath);
 
-        Mockito.verify(salTableService).updateTable(Matchers.<UpdateTableInput>any());
+        Mockito.verify(salTableService).updateTable(ArgumentMatchers.<UpdateTableInput>any());
 
         Assert.assertTrue(updateResult.isDone());
         final RpcResult<UpdateTableOutput> updateTableResult = updateResult.get(2, TimeUnit.SECONDS);
index 379eb257b88379f24631f93fe79f3dab2ff06cb7..183d1c0ecc11466fdb50531f399979025e3fbe78 100644 (file)
@@ -27,8 +27,8 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -83,11 +83,11 @@ public class ReconcileUtilTest {
         Mockito.when(flowCapableService.sendBarrier(barrierInputCaptor.capture()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
 
-        Mockito.verify(flowCapableService, Mockito.never()).sendBarrier(Matchers.<SendBarrierInput>any());
+        Mockito.verify(flowCapableService, Mockito.never()).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         Assert.assertFalse(vehicle.isDone());
 
         testRabbit.set(RpcResultBuilder.<Void>success().build());
-        Mockito.verify(flowCapableService).sendBarrier(Matchers.<SendBarrierInput>any());
+        Mockito.verify(flowCapableService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         Assert.assertTrue(vehicle.isDone());
         Assert.assertTrue(vehicle.get().isSuccessful());
     }
index 49b35bdb0b53ab3a5419514bc0832a13f7595c67..a718e5280c00b07c183ca04eb9be7156e0718043 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index 7d8fc78fa31e8fe06e6ce1a6ff0bf756eb4c51c6..aa653bf649e591908eb0100adf6eb572003c5ad8 100644 (file)
@@ -31,7 +31,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInputBuilder;
@@ -129,7 +128,7 @@ public class LLDPSpeaker implements NodeConnectorEventsObserver, Runnable, AutoC
             LOG.debug("Sending LLDP frames to total {} ports", getOwnedPorts());
             nodeConnectorMap.keySet().forEach(ncIID -> {
                 NodeConnectorId nodeConnectorId = InstanceIdentifier.keyOf(ncIID).getId();
-                NodeId nodeId = ncIID.firstKeyOf(Node.class, NodeKey.class).getId();
+                NodeId nodeId = ncIID.firstKeyOf(Node.class).getId();
                 if (deviceOwnershipService.isEntityOwned(nodeId.getValue())) {
                     LOG.debug("Node is owned by this controller, sending LLDP packet through port {}",
                             nodeConnectorId.getValue());
@@ -205,7 +204,7 @@ public class LLDPSpeaker implements NodeConnectorEventsObserver, Runnable, AutoC
     private int getOwnedPorts() {
         AtomicInteger ownedPorts = new AtomicInteger();
         nodeConnectorMap.keySet().forEach(ncIID -> {
-            NodeId nodeId = ncIID.firstKeyOf(Node.class, NodeKey.class).getId();
+            NodeId nodeId = ncIID.firstKeyOf(Node.class).getId();
             if (deviceOwnershipService.isEntityOwned(nodeId.getValue())) {
                 ownedPorts.incrementAndGet();
             }
index 8adf0f54a7699df754f9b039817fe4c9c56e2253..f464ca7293e36546a79eeb7a17d28ef4e43560b7 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.openflowplugin.applications.lldpspeaker;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
index 4c15d47ae33cbb19178b5ca8abdeb18d66ff23be..494665f033ca3071078e0f1d2757f43b35b24322 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index 6b5263dd3a9ce20269c2dbcec0bdb295fb016b5c..b6faa26f4c8ecc246efb5e3d655029d55172f0ac 100644 (file)
@@ -101,7 +101,7 @@ public abstract class AbstractNotificationSupplierBase<O extends DataObject> imp
      * @return Keyed InstanceIdentifier for Node
      */
     protected static KeyedInstanceIdentifier<Node, NodeKey> getNodeII(final InstanceIdentifier<?> ii) {
-        final NodeKey key = ii.firstKeyOf(Node.class, NodeKey.class);
+        final NodeKey key = ii.firstKeyOf(Node.class);
         Preconditions.checkArgument(key != null);
         return InstanceIdentifier.create(Nodes.class).child(Node.class, key);
     }
@@ -124,7 +124,7 @@ public abstract class AbstractNotificationSupplierBase<O extends DataObject> imp
      * @return extracted {@link NodeId}
      */
     public static NodeId getNodeId(InstanceIdentifier<?> path) {
-        final NodeKey nodeKey = Preconditions.checkNotNull(path.firstKeyOf(Node.class, NodeKey.class));
+        final NodeKey nodeKey = Preconditions.checkNotNull(path.firstKeyOf(Node.class));
         return nodeKey.getId();
     }
 }
index 77c4a05696b4be22b4212da79792df8960d1ab17..a855408bea02480301fdc8a7e7bf5096ccaceedb 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeCon
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdated;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdatedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
@@ -57,7 +56,7 @@ public class NodeConnectorNotificationSupplierImpl extends
         final NodeConnectorUpdatedBuilder notifBuilder = new NodeConnectorUpdatedBuilder();
         final FlowCapableNodeConnectorUpdatedBuilder connNotifBuilder = new FlowCapableNodeConnectorUpdatedBuilder(
                 flowCapableNodeConnector);
-        notifBuilder.setId(path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId());
+        notifBuilder.setId(path.firstKeyOf(NodeConnector.class).getId());
         notifBuilder.setNodeConnectorRef(new NodeConnectorRef(path));
         notifBuilder.addAugmentation(FlowCapableNodeConnectorUpdated.class, connNotifBuilder.build());
         return notifBuilder.build();
index 0c0da35c97d1025e1ab02297d797edb96992fc6f..f86a7dc17c7000ef10b461c1d29310477f81db08 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRem
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeUpdated;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeUpdatedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
@@ -55,7 +54,7 @@ public class NodeNotificationSupplierImpl extends AbstractNotificationSupplierFo
         Preconditions.checkArgument(ii != null);
         final FlowCapableNodeUpdatedBuilder flowNodeNotifBuilder = new FlowCapableNodeUpdatedBuilder(flowCapableNode);
         final NodeUpdatedBuilder notifBuilder = new NodeUpdatedBuilder();
-        notifBuilder.setId(ii.firstKeyOf(Node.class, NodeKey.class).getId());
+        notifBuilder.setId(ii.firstKeyOf(Node.class).getId());
         notifBuilder.setNodeRef(new NodeRef(getNodeII(ii)));
         notifBuilder.addAugmentation(FlowCapableNodeUpdated.class, flowNodeNotifBuilder.build());
         return notifBuilder.build();
index 877ceb1ba07ef9a72e865b00f98e1f6d02adb7c9..a8b05a6c005896eeeb6d40d8255ab9da060d91de 100644 (file)
@@ -20,7 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.Gro
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdatedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
@@ -72,7 +71,7 @@ public class GroupNotificationSupplierImpl extends AbstractNotificationSupplierF
     public GroupRemoved deleteNotification(final InstanceIdentifier<Group> path) {
         Preconditions.checkArgument(path != null);
         final GroupRemovedBuilder builder = new GroupRemovedBuilder();
-        builder.setGroupId(path.firstKeyOf(Group.class, GroupKey.class).getGroupId());
+        builder.setGroupId(path.firstKeyOf(Group.class).getGroupId());
         builder.setGroupRef(new GroupRef(path));
         builder.setNode(createNodeRef(path));
         return builder.build();
index 95d0333a8535a648bb1a1c42e3b5254aede893ec..51af021b08d9b7ec901b2b749565b9ef95f14379 100644 (file)
@@ -13,7 +13,6 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterAdded;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterAddedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterRemoved;
@@ -72,7 +71,7 @@ public class MeterNotificationSupplierImpl extends
     public MeterRemoved deleteNotification(final InstanceIdentifier<Meter> path) {
         Preconditions.checkArgument(path != null);
         final MeterRemovedBuilder builder = new MeterRemovedBuilder();
-        builder.setMeterId(path.firstKeyOf(Meter.class, MeterKey.class).getMeterId());
+        builder.setMeterId(path.firstKeyOf(Meter.class).getMeterId());
         builder.setMeterRef(new MeterRef(path));
         builder.setNode(createNodeRef(path));
         return builder.build();
index 35fe61cee788b1b8a29f348f17cc4f2d0899842e..01d4f62da83520cf14e2fb76bbddf708d9218f91 100644 (file)
@@ -15,7 +15,6 @@ import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowStatisticsData;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowsStatisticsUpdate;
@@ -59,7 +58,7 @@ public class FlowStatNotificationSupplierImpl extends AbstractNotificationSuppli
         Preconditions.checkArgument(path != null);
 
         final FlowAndStatisticsMapListBuilder fsmlBuilder = new FlowAndStatisticsMapListBuilder(flowStatistics);
-        fsmlBuilder.setFlowId(new FlowId(path.firstKeyOf(Flow.class, FlowKey.class).getId().getValue()));
+        fsmlBuilder.setFlowId(new FlowId(path.firstKeyOf(Flow.class).getId().getValue()));
 
         final FlowsStatisticsUpdateBuilder builder = new FlowsStatisticsUpdateBuilder();
         builder.setId(getNodeId(path));
index 755fb29ceb3c4a9e753fa32892028a031ed2f3b2..971547c434b76d3b5858f591f6eaed6b6f1603ac 100644 (file)
@@ -14,7 +14,6 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsData;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdate;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdateBuilder;
@@ -60,7 +59,7 @@ public class FlowTableStatNotificationSupplierImpl extends
 
         final FlowTableAndStatisticsMapBuilder ftsmBuilder = new FlowTableAndStatisticsMapBuilder(flowTableStatistics);
         ftsmBuilder.withKey(new FlowTableAndStatisticsMapKey(
-                new TableId(path.firstKeyOf(Table.class, TableKey.class).getId())));
+                new TableId(path.firstKeyOf(Table.class).getId())));
 
         final FlowTableStatisticsUpdateBuilder builder = new FlowTableStatisticsUpdateBuilder();
         builder.setId(getNodeId(path));
index c12b9b9833287333a6cdd249b055aa0728996f62..f9bd34d2f847f625a8634fbc19db111716a46895 100644 (file)
@@ -57,7 +57,7 @@ public class NodeConnectorStatNotificationSupplierImpl extends
         Preconditions.checkArgument(path != null);
 
         final NodeConnectorBuilder ncBuilder = new NodeConnectorBuilder();
-        final NodeConnectorKey ncKey = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
+        final NodeConnectorKey ncKey = path.firstKeyOf(NodeConnector.class);
         ncBuilder.setId(ncKey.getId());
         ncBuilder.withKey(ncKey);
 
index 67c27cd73201034f12a1f461b476c142204857cc..c626a0d7a1bd921e55342389630d24b6bf041cff 100644 (file)
@@ -59,7 +59,7 @@ public class QueueStatNotificationSupplierImpl extends
         Preconditions.checkArgument(path != null);
 
         final NodeConnectorBuilder connBuilder = new NodeConnectorBuilder();
-        final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
+        final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class);
         connBuilder.setId(key.getId());
         connBuilder.withKey(key);
 
index 8995b1fa38e28177278e2cd5fa03e520f9276472..a75c5858c1eadf5b8cfb78a90120f689ebbed819 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -77,9 +77,9 @@ public class NodeConnectorNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(FLOW_CODE_CONNECTOR_ID, notification.getId().getValue());
         assertEquals(FLOW_CODE_CONNECTOR_ID, notification.getNodeConnectorRef().getValue()
-                .firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue());
+                .firstKeyOf(NodeConnector.class).getId().getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNodeConnectorRef().getValue().firstKeyOf(Node.class, NodeKey.class).getId()
+                     notification.getNodeConnectorRef().getValue().firstKeyOf(Node.class).getId()
                              .getValue());
     }
 
@@ -91,7 +91,7 @@ public class NodeConnectorNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNodeConnector>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(NodeConnectorUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -110,9 +110,9 @@ public class NodeConnectorNotificationSupplierImplTest {
                 .deleteNotification(createTestFlowCapableConnectorNodePath());
         assertNotNull(notification);
         assertEquals(FLOW_CODE_CONNECTOR_ID, notification.getNodeConnectorRef().getValue()
-                .firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId().getValue());
+                .firstKeyOf(NodeConnector.class).getId().getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNodeConnectorRef().getValue().firstKeyOf(Node.class, NodeKey.class).getId()
+                     notification.getNodeConnectorRef().getValue().firstKeyOf(Node.class).getId()
                              .getValue());
     }
 
@@ -124,7 +124,7 @@ public class NodeConnectorNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNodeConnector>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorRemoved.class));
+        verify(notifProviderService, times(1)).publish(any(NodeConnectorRemoved.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index 3a93b9cc22054c83722661ce27328279a0a28a99..1b3e2665f1746b7a85566e42086b80cfad07e90f 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -73,7 +73,7 @@ public class NodeNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(FLOW_NODE_ID, notification.getId().getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNodeRef().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNodeRef().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -83,7 +83,7 @@ public class NodeNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNode>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(NodeUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(NodeUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -101,7 +101,7 @@ public class NodeNotificationSupplierImplTest {
         final NodeRemoved notification = notifSupplierImpl.deleteNotification(createTestFlowCapableNodePath());
         assertNotNull(notification);
         assertEquals(FLOW_NODE_ID,
-                     notification.getNodeRef().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNodeRef().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -111,7 +111,7 @@ public class NodeNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNode>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(NodeRemoved.class));
+        verify(notifProviderService, times(1)).publish(any(NodeRemoved.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index adba9bf4fc92984c3b8baa8da04fe44be4564a3d..662d78d2920a14541a37079ed6f0a00fed5af6d7 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper;
 
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mockito;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
@@ -23,7 +23,7 @@ public final class TestSupplierVerifyHelper {
     public static void verifyDataTreeChangeListenerRegistration(DataBroker dataBroker) {
 
         Mockito.verify(dataBroker).registerDataTreeChangeListener(
-                Matchers.<DataTreeIdentifier>any(),
-                Matchers.<DataTreeChangeListener>any());
+                ArgumentMatchers.<DataTreeIdentifier>any(),
+                ArgumentMatchers.<DataTreeChangeListener>any());
     }
 }
index 43a167d09d321bdb7205257eca47c9db4def9201..103d13f20088bd2f0f883174662f327a2c02684a 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -85,11 +85,11 @@ public class FlowNotificationSupplierImplTest {
         final FlowAdded notification = notifSupplierImpl.createNotification(createTestFlow(), createTestFlowPath());
         assertNotNull(notification);
         assertEquals(FLOW_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Flow.class, FlowKey.class).getId().getValue());
+                     notification.getFlowRef().getValue().firstKeyOf(Flow.class).getId().getValue());
         assertEquals(FLOW_TABLE_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Table.class, TableKey.class).getId());
+                     notification.getFlowRef().getValue().firstKeyOf(Table.class).getId());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -99,7 +99,7 @@ public class FlowNotificationSupplierImplTest {
         Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(FlowAdded.class));
+        verify(notifProviderService, times(1)).publish(any(FlowAdded.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -117,11 +117,11 @@ public class FlowNotificationSupplierImplTest {
         final FlowUpdated notification = notifSupplierImpl.updateNotification(createTestFlow(), createTestFlowPath());
         assertNotNull(notification);
         assertEquals(FLOW_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Flow.class, FlowKey.class).getId().getValue());
+                     notification.getFlowRef().getValue().firstKeyOf(Flow.class).getId().getValue());
         assertEquals(FLOW_TABLE_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Table.class, TableKey.class).getId());
+                     notification.getFlowRef().getValue().firstKeyOf(Table.class).getId());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -131,7 +131,7 @@ public class FlowNotificationSupplierImplTest {
         Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(FlowUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(FlowUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -149,11 +149,11 @@ public class FlowNotificationSupplierImplTest {
         final FlowRemoved notification = notifSupplierImpl.deleteNotification(createTestFlowPath());
         assertNotNull(notification);
         assertEquals(FLOW_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Flow.class, FlowKey.class).getId().getValue());
+                     notification.getFlowRef().getValue().firstKeyOf(Flow.class).getId().getValue());
         assertEquals(FLOW_TABLE_ID,
-                     notification.getFlowRef().getValue().firstKeyOf(Table.class, TableKey.class).getId());
+                     notification.getFlowRef().getValue().firstKeyOf(Table.class).getId());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -163,7 +163,7 @@ public class FlowNotificationSupplierImplTest {
         Collection<DataTreeModification<Flow>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(FlowRemoved.class));
+        verify(notifProviderService, times(1)).publish(any(FlowRemoved.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index ce54af8f7f7bbb6af1c55c8d48f60bafa5c896bd..bef02498ed3f2cf12168a318e23ae21c80bccdc0 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -82,10 +82,10 @@ public class GroupNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(GROUP_ID, notification.getGroupId().getValue());
         assertEquals(GROUP_ID,
-                     notification.getGroupRef().getValue().firstKeyOf(Group.class, GroupKey.class).getGroupId()
+                     notification.getGroupRef().getValue().firstKeyOf(Group.class).getGroupId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -95,7 +95,7 @@ public class GroupNotificationSupplierImplTest {
         Collection<DataTreeModification<Group>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(GroupAdded.class));
+        verify(notifProviderService, times(1)).publish(any(GroupAdded.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -115,10 +115,10 @@ public class GroupNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(GROUP_ID, notification.getGroupId().getValue());
         assertEquals(GROUP_ID,
-                     notification.getGroupRef().getValue().firstKeyOf(Group.class, GroupKey.class).getGroupId()
+                     notification.getGroupRef().getValue().firstKeyOf(Group.class).getGroupId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -128,7 +128,7 @@ public class GroupNotificationSupplierImplTest {
         Collection<DataTreeModification<Group>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(GroupUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(GroupUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -147,10 +147,10 @@ public class GroupNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(GROUP_ID, notification.getGroupId().getValue());
         assertEquals(GROUP_ID,
-                     notification.getGroupRef().getValue().firstKeyOf(Group.class, GroupKey.class).getGroupId()
+                     notification.getGroupRef().getValue().firstKeyOf(Group.class).getGroupId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -160,7 +160,7 @@ public class GroupNotificationSupplierImplTest {
         Collection<DataTreeModification<Group>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(GroupRemoved.class));
+        verify(notifProviderService, times(1)).publish(any(GroupRemoved.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index 3ca4e09d6e8ba8183582fc42ea7a5f8c7e2c1433..c5bdd1a41de0a86b82bbd06690ef440f6dd176a5 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -83,10 +83,10 @@ public class MeterNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(METER_ID, notification.getMeterId().getValue());
         assertEquals(METER_ID,
-                     notification.getMeterRef().getValue().firstKeyOf(Meter.class, MeterKey.class).getMeterId()
+                     notification.getMeterRef().getValue().firstKeyOf(Meter.class).getMeterId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -96,7 +96,7 @@ public class MeterNotificationSupplierImplTest {
         Collection<DataTreeModification<Meter>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(MeterAdded.class));
+        verify(notifProviderService, times(1)).publish(any(MeterAdded.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -116,10 +116,10 @@ public class MeterNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(METER_ID, notification.getMeterId().getValue());
         assertEquals(METER_ID,
-                     notification.getMeterRef().getValue().firstKeyOf(Meter.class, MeterKey.class).getMeterId()
+                     notification.getMeterRef().getValue().firstKeyOf(Meter.class).getMeterId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -129,7 +129,7 @@ public class MeterNotificationSupplierImplTest {
         Collection<DataTreeModification<Meter>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(MeterUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(MeterUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -148,10 +148,10 @@ public class MeterNotificationSupplierImplTest {
         assertNotNull(notification);
         assertEquals(METER_ID, notification.getMeterId().getValue());
         assertEquals(METER_ID,
-                     notification.getMeterRef().getValue().firstKeyOf(Meter.class, MeterKey.class).getMeterId()
+                     notification.getMeterRef().getValue().firstKeyOf(Meter.class).getMeterId()
                              .getValue());
         assertEquals(FLOW_NODE_ID,
-                     notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
+                     notification.getNode().getValue().firstKeyOf(Node.class).getId().getValue());
     }
 
     @Test
@@ -161,7 +161,7 @@ public class MeterNotificationSupplierImplTest {
         Collection<DataTreeModification<Meter>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(MeterRemoved.class));
+        verify(notifProviderService, times(1)).publish(any(MeterRemoved.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index c737426c1d53e886000f08eae84378bcd75f5c40..02deebd592043556d199f050aecde7577c13bf84 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -89,7 +89,7 @@ public class FlowStatNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowStatistics>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(FlowsStatisticsUpdate.class));
+        verify(notifProviderService, times(1)).publish(any(FlowsStatisticsUpdate.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index d3c836867c2cc357278fad5e2d94af229bcca757..30871057ff8108b8ace8d086f4914427bee44ae6 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -86,7 +86,7 @@ public class FlowTableStatNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowTableStatistics>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(FlowTableStatisticsUpdate.class));
+        verify(notifProviderService, times(1)).publish(any(FlowTableStatisticsUpdate.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index 2b0e9b3787d295bde71db67ef52812212f0a2f1b..aeafe292ee2f00ceba344b5f4c613c737673051e 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -86,7 +86,7 @@ public class GroupStatNotificationSupplierImplTest {
         Collection<DataTreeModification<GroupStatistics>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(GroupStatisticsUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(GroupStatisticsUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index ad86ad455cee117d32e7d8742ada453910d9c556..6d6ea50751509ef6537385925ee6707db7d3b824 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -86,7 +86,7 @@ public class MeterStatNotificationSupplierImplTest {
         Collection<DataTreeModification<MeterStatistics>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(MeterStatisticsUpdated.class));
+        verify(notifProviderService, times(1)).publish(any(MeterStatisticsUpdated.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index 59ecad7abdb1c75eeef30978895d9d62ac59fc99..cd765c4f51f7abfb4999c4362654cac8719b57cd 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -86,7 +86,7 @@ public class NodeConnectorStatNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNodeConnectorStatistics>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(NodeConnectorStatisticsUpdate.class));
+        verify(notifProviderService, times(1)).publish(any(NodeConnectorStatisticsUpdate.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index a28ae1a8a38fc7a8aa4147f8a4bcb9981798950d..6604b31c57c207470314308ffcafe94bea814f9b 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -88,7 +88,7 @@ public class QueueStatNotificationSupplierImplTest {
         Collection<DataTreeModification<FlowCapableNodeConnectorQueueStatisticsData>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(QueueStatisticsUpdate.class));
+        verify(notifProviderService, times(1)).publish(any(QueueStatisticsUpdate.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
index 86eb8d5202899ee498898dd3e5443daab5bd8aba..73caa58f5c91684e21dfd752976349dd20bb5b03 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index 08331f135a5452b89df23f8290c69202eb9e0783..6a2bfe896409d54f9ab4d55d7622eb7d199780af 100644 (file)
@@ -26,7 +26,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Fl
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigOutput;
@@ -83,7 +82,7 @@ public class DefaultConfigPusher implements AutoCloseable, ClusteredDataTreeChan
         for (DataTreeModification<FlowCapableNode> modification : modifications) {
             if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
                 String nodeId = modification.getRootPath().getRootIdentifier()
-                        .firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+                        .firstKeyOf(Node.class).getId().getValue();
                 if (deviceOwnershipService.isEntityOwned(nodeId)) {
                     SetConfigInputBuilder setConfigInputBuilder = new SetConfigInputBuilder();
                     setConfigInputBuilder.setFlag(SwitchConfigFlag.FRAGNORMAL.toString());
index 8b746ed3539c1920e38c1a5f765e4e9616f33c89..48958ec855caed1e8792a2c0ed71667d1e081357 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.openflow.ofswitch.config;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
 
index 396f96703775c7038c50c2a7ab152d103f845f72..9de2f9efdc50469e547c6e493f6783b13cbd39bc 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index a531a35c592d9a3bb47c38d2c5cdcb94c6f4ecba..fd2d3fb670435ef024f5e48a4c77261631b4d914 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index cab6b27b8c0896ecfc0da06e53004b2f9f4b9a4d..dbd01f196e2cb0e258676560cc38baf4e3ed46f2 100644 (file)
@@ -155,7 +155,7 @@ public class ReconciliationServiceImpl implements ReconciliationService, AutoClo
 
     private ListenableFuture<RpcResult<ReconcileOutput>> buildErrorResponse(String msg) {
         SettableFuture<RpcResult<ReconcileOutput>> result = SettableFuture.create();
-        LOG.error(msg);
+        LOG.error("Error {}", msg);
         RpcError error = RpcResultBuilder.newError(RpcError.ErrorType.PROTOCOL, "reconcile", msg);
         result.set(RpcResultBuilder.<ReconcileOutput>failed().withRpcError(error).build());
         return result;
index bce384629323f956a5e23db7ba19eef4dada59ad..f3dc9cada82b70979c2317c94b1c46c5fa94e7aa 100644 (file)
@@ -110,7 +110,7 @@ public final class ShellUtil {
                 if (flowCapableNode != null) {
                     name = node.<FlowCapableNode>augmentation(FlowCapableNode.class).getDescription();
                 } else {
-                    LOG.error("Error while converting OFNode:{} to FlowCapableNode: {}", node.getId());
+                    LOG.error("Error while converting OFNode:{} to FlowCapableNode", node.getId());
                     return null;
                 }
                 nodeConnectors = node.getNodeConnector();
@@ -118,7 +118,7 @@ public final class ShellUtil {
                     FlowCapableNodeConnector flowCapableNodeConnector =
                             nodeConnector.augmentation(FlowCapableNodeConnector.class);
                     if (flowCapableNodeConnector == null) {
-                        LOG.error("Error for OFNode:{} while reading nodeConnectors {}", node.getId());
+                        LOG.error("Error for OFNode:{} while reading nodeConnectors", node.getId());
                         return null;
                     } else {
                         String portName = flowCapableNodeConnector.getName();
@@ -127,11 +127,11 @@ public final class ShellUtil {
                 }
                 ofNode = new OFNode(nodeId, name, portList);
             } else {
-                LOG.error("OFNode with nodeId {} not present Inventory DS: {}", nodeId);
+                LOG.error("OFNode with nodeId {} not present Inventory DS", nodeId);
                 return null;
             }
         } catch (ExecutionException | InterruptedException e) {
-            LOG.error("Error reading node {} from Inventory DS: {}", nodeId, e);
+            LOG.error("Error reading node {} from Inventory DS", nodeId, e);
         }
         return ofNode;
     }
index 8d11717481fc4911b55acfb34ef4f6cf9336b4b3..db30b753ebaffa4cc13e16325bdf2a5c787f61e1 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.openflowplugin</groupId>
index 74e264a104926c36a064ad1285212373c6925e05..4ff687b063eafbb8f7b526410ea47e2e3fdd6c95 100644 (file)
@@ -52,7 +52,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -106,7 +105,7 @@ public class LLDPPacketPuntEnforcer implements AutoCloseable, ClusteredDataTreeC
         for (DataTreeModification<FlowCapableNode> modification : modifications) {
             if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
                 String nodeId = modification.getRootPath().getRootIdentifier()
-                        .firstKeyOf(Node.class, NodeKey.class).getId().getValue();
+                        .firstKeyOf(Node.class).getId().getValue();
                 if (deviceOwnershipService.isEntityOwned(nodeId)) {
                     AddFlowInputBuilder addFlowInput = new AddFlowInputBuilder(createFlow());
                     addFlowInput.setNode(new NodeRef(modification.getRootPath()
index aba225f8af169fbd2035aec5d5d4847fef7f40f9..3ba16ab8c51fbb4e87e3b87d86da1c9cbcc5533e 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.applications.tablemissenforcer;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.when;
 
index 39288e64ba51ac8dc059c0e1754a9609bccbd9ce..485926a9da2144ba44a34b261e404ec8caebdc74 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.openflowplugin.applications.topology.lldp.utils;
 
-import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.hash.HashCode;
 import com.google.common.hash.HashFunction;
@@ -20,6 +19,8 @@ import java.nio.charset.StandardCharsets;
 import java.security.NoSuchAlgorithmException;
 import java.util.Arrays;
 import java.util.Objects;
+import java.util.Optional;
+
 import org.apache.commons.lang3.ArrayUtils;
 import org.opendaylight.mdsal.eos.binding.api.Entity;
 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
index 2645cefde98b84971c76a66d07a414433c17e4e6..5b91031d29fd5bc34947963db41dfa82ba82d416 100644 (file)
@@ -10,13 +10,14 @@ package org.opendaylight.openflowplugin.applications.topology.lldp;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.verify;
 
-import com.google.common.base.Optional;
+import java.util.Optional;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -71,7 +72,7 @@ public class LLDPLinkAgerTest {
         lldpLinkAger = new LLDPLinkAger(getConfig(), notificationService, getConfigurationService(), eos);
         Mockito.when(link.getDestination()).thenReturn(new NodeConnectorRef(
                 InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(new NodeId("openflow:1")))));
-        Mockito.when(eos.getOwnershipState(Mockito.any(Entity.class))).thenReturn(
+        Mockito.when(eos.getOwnershipState(any(Entity.class))).thenReturn(
                 Optional.of(EntityOwnershipState.IS_OWNER));
     }
 
@@ -95,7 +96,7 @@ public class LLDPLinkAgerTest {
     public void testLLDPAgingTask() throws InterruptedException {
         lldpLinkAger.put(link);
         Thread.sleep(SLEEP);
-        verify(notificationService).publish(Matchers.any(LinkRemoved.class));
+        verify(notificationService).publish(any(LinkRemoved.class));
     }
 
     private TopologyLldpDiscoveryConfig getConfig() {
@@ -109,13 +110,13 @@ public class LLDPLinkAgerTest {
         final ConfigurationService configurationService = Mockito.mock(ConfigurationService.class);
         final TopologyLldpDiscoveryConfig config = getConfig();
 
-        Mockito.when(configurationService.registerListener(Mockito.any())).thenReturn(() -> {
+        Mockito.when(configurationService.registerListener(any())).thenReturn(() -> {
         });
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-interval"), Mockito.any()))
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("topology-lldp-interval"), any()))
                 .thenReturn(config.getTopologyLldpInterval());
 
-        Mockito.when(configurationService.getProperty(Mockito.eq("topology-lldp-expiration-interval"), Mockito.any()))
+        Mockito.lenient().when(configurationService.getProperty(Mockito.eq("topology-lldp-expiration-interval"), any()))
                 .thenReturn(config.getTopologyLldpExpirationInterval());
 
         return configurationService;
index 8b99250f4d02c0f80128c6642f75d2996b4aead3..3ee30561bc684305b567be83898494e277525061 100644 (file)
@@ -48,9 +48,8 @@ public class LLDPDiscoveryUtilsTest {
 
         NodeConnectorRef nodeConnectorRef = LLDPDiscoveryUtils.lldpToNodeConnectorRef(packetLLDP, false);
 
-        NodeKey nodeKey = nodeConnectorRef.getValue().firstKeyOf(Node.class, NodeKey.class);
-        NodeConnectorKey nodeConnectorKey = nodeConnectorRef.getValue().firstKeyOf(NodeConnector.class,
-                NodeConnectorKey.class);
+        NodeKey nodeKey = nodeConnectorRef.getValue().firstKeyOf(Node.class);
+        NodeConnectorKey nodeConnectorKey = nodeConnectorRef.getValue().firstKeyOf(NodeConnector.class);
 
         assertEquals(nodeKey.getId().getValue(), "openflow:2");
         assertEquals(nodeConnectorKey.getId().getValue(), "openflow:2:2");
index 1d86b798fddc03fd64d38269a76e3d85d8748873..d79cebb1e67d663b968d807c9850dd5e7d6c072e 100644 (file)
@@ -36,15 +36,15 @@ public final class FlowCapableNodeMapping {
     }
 
     public static NodeKey getNodeKey(final NodeRef ref) {
-        return ref.getValue().firstKeyOf(Node.class, NodeKey.class);
+        return ref.getValue().firstKeyOf(Node.class);
     }
 
     public static NodeKey getNodeKey(final NodeConnectorRef ref) {
-        return ref.getValue().firstKeyOf(Node.class, NodeKey.class);
+        return ref.getValue().firstKeyOf(Node.class);
     }
 
     public static NodeConnectorKey getNodeConnectorKey(final NodeConnectorRef ref) {
-        return ref.getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
+        return ref.getValue().firstKeyOf(NodeConnector.class);
     }
 
     public static NodeId toTopologyNodeId(
index 87ab94102e9dbd281a188e3fdfd410afdd2e833e..db653707c30f4e041e033cb881759356999e726e 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.openflowplugin.applications.topology.manager;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
index fa6a2b284e6d363412819621fcfe9ea3be6213f3..dd0848d755900468e0344dd4b5ee0349347132c5 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.openflowplugin.applications.topology.manager;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
index c13514fe21ca438c38bc98136973f31aed852f92..f471e66b6643e0307af97612c9df92c87a2f6098 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.openflowplugin.applications.topology.manager;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
index 38e8b72afb02c68d02a6baeb6ce2cb92bb44ac18..103320303dfbc6fe51f8064ec1efd3df034a72d3 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.applications.topology.manager;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.atLeast;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.inOrder;
index 90b2d3a8f15c3414fb3475fe093fc3f0eb27ed8e..78eac87b65e72e54e513e28a20d697de44c88cb1 100644 (file)
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 4855da91069f4f7fa3bd17028325814994bde264..af4367830d77e25f9cfc73fa19ed4be17ce9a4a3 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
   </parent>
   <groupId>org.opendaylight.openflowplugin</groupId>
   <artifactId>openflowplugin-karaf</artifactId>
index c3e7958466dcdc9cc9dfcc42ccac40e13107198e..c38dd8e10ed457a5d83854ee1bb662559619a7a6 100644 (file)
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index 960961f061e1fa2da9f342dd04f35175773d0634..b0067fd36d49658be64a064dd08dee763e10931d 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index ac32ce433f83adfa1872b3d6e2192f325a5d4ea7..42fd7a0325bdcd3b38ba2a7becc7dd5a5659b826 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 6c5bd742cb28f090ec16a833322c21cf1f07f671..8ded3667084a3a4ff7a18d570461ffa85f60449c 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index aeea734e8f30e45b99894ad435c4fceecd24046f..7957825f3445ef3326bce03eee173832537fc975 100644 (file)
@@ -3,7 +3,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
index 95ed1f8587ebea2ff6726548ca37a11c3ff1dd7c..ccf96b213d136e6f4a80799dd9c65f84523375fe 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
-<project
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index a1f1c7a6590308e612aa89d7b800865c1afbc584..e6957d6caf4b5c4e6c66305d22856af50baedc3b 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index a453440a2001ea41ea2d19b934ef5d886340ef18..03cb99afe47571eec69ddbed5e1dac3dbb652fa1 100644 (file)
@@ -214,8 +214,8 @@ public final class LearnCodecUtil {
         }
 
         if (LearnCodecUtil.length != 0) {
-            LOG.error("Learn Codec read " + Math.abs(messageLength)
-                    + " bytes more than needed from stream. Packet might be corrupted");
+            LOG.error("Learn Codec read {} bytes more than needed from stream. Packet might be corrupted",
+                    Math.abs(messageLength));
         }
         nxActionLearnBuilder.setFlowMods(flowModeList);
     }
index 5bb12dbe2f7fb27f511bb342b7b219a96201b3eb..764142b090474eee92c095112eb8a7fd1037aa83 100644 (file)
@@ -10,13 +10,14 @@ package org.opendaylight.openflowjava.nx;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 
 import java.util.LinkedList;
 import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -84,17 +85,17 @@ public class NiciraExtensionCodecRegistratorImplTest {
 
     @Test
     public void niciraExtensionsCodecRegistratorImplTest() {
-        Mockito.verify(provider).registerActionDeserializer(Matchers.eq(ActionDeserializer.OF10_DESERIALIZER_KEY),
-                Matchers.any(ActionDeserializer.class));
-        Mockito.verify(provider).registerActionDeserializer(Matchers.eq(ActionDeserializer.OF13_DESERIALIZER_KEY),
-                Matchers.any(ActionDeserializer.class));
+        Mockito.verify(provider).registerActionDeserializer(eq(ActionDeserializer.OF10_DESERIALIZER_KEY),
+                any(ActionDeserializer.class));
+        Mockito.verify(provider).registerActionDeserializer(eq(ActionDeserializer.OF13_DESERIALIZER_KEY),
+                any(ActionDeserializer.class));
     }
 
     @Test
     public void registerActionSerializerTest() {
         niciraExtensionCodecRegistrator.registerActionSerializer(actionSerializerKey, actionSerializer);
         ActionSerializerKey key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
-        Mockito.verify(provider).registerActionSerializer(Matchers.eq(key1), Matchers.any(OFGeneralSerializer.class));
+        Mockito.verify(provider).registerActionSerializer(eq(key1), any(OFGeneralSerializer.class));
     }
 
     @Test
@@ -102,7 +103,7 @@ public class NiciraExtensionCodecRegistratorImplTest {
         niciraExtensionCodecRegistrator.registerActionSerializer(actionSerializerKey, actionSerializer);
         ActionSerializerKey key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
         niciraExtensionCodecRegistrator.unregisterActionSerializer(actionSerializerKey);
-        Mockito.verify(provider).unregisterSerializer(Matchers.eq(key1));
+        Mockito.verify(provider).unregisterSerializer(eq(key1));
     }
 
     @Test
@@ -111,7 +112,7 @@ public class NiciraExtensionCodecRegistratorImplTest {
         niciraExtensionCodecRegistrator.registerActionDeserializer(actionDeserializerKey, actionDeserializer);
         assertFalse(niciraExtensionCodecRegistrator.isEmptyActionDeserializers());
         Mockito.verify((DeserializerRegistryInjector) actionDeserializer)
-                .injectDeserializerRegistry(Matchers.any());
+                .injectDeserializerRegistry(any());
     }
 
     @Test
index e1de303946ba38063c7e097497567b8d1d466827..18d0bd25fa1505da3144a084fa87e9fc2584c64a 100644 (file)
@@ -7,10 +7,12 @@
  */
 package org.opendaylight.openflowjava.nx;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -141,242 +143,242 @@ public class NiciraExtensionsRegistratorTest {
     @Test
     public void registerNiciraExtensionsTest() {
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 7)),
-                Matchers.any(RegLoadCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 7)),
+                any(RegLoadCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad.class)),
-                Matchers.any(RegLoadCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad.class)),
+                any(RegLoadCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 33)),
-                Matchers.any(RegLoad2Codec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 33)),
+                any(RegLoad2Codec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad2.class)),
-                Matchers.any(RegLoad2Codec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad2.class)),
+                any(RegLoad2Codec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 6)),
-                Matchers.any(RegMoveCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 6)),
+                any(RegMoveCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegMove.class)),
-                Matchers.any(RegMoveCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegMove.class)),
+                any(RegMoveCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 15)),
-                Matchers.any(OutputRegCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 15)),
+                any(OutputRegCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg.class)),
-                Matchers.any(OutputRegCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg.class)),
+                any(OutputRegCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 32)),
-                Matchers.any(OutputReg2Codec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 32)),
+                any(OutputReg2Codec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg2.class)),
-                Matchers.any(OutputReg2Codec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg2.class)),
+                any(OutputReg2Codec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionResubmit.class)),
-                Matchers.any(ResubmitCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionResubmit.class)),
+                any(ResubmitCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 1)),
-                Matchers.any(ResubmitCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 1)),
+                any(ResubmitCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 14)),
-                Matchers.any(ResubmitCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 14)),
+                any(ResubmitCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionMultipath.class)),
-                Matchers.any(MultipathCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionMultipath.class)),
+                any(MultipathCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 10)),
-                Matchers.any(MultipathCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 10)),
+                any(MultipathCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 46)),
-                Matchers.any(EncapCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 46)),
+                any(EncapCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionEncap.class)),
-                Matchers.any(EncapCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionEncap.class)),
+                any(EncapCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 47)),
-                Matchers.any(DecapCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 47)),
+                any(DecapCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecap.class)),
-                Matchers.any(DecapCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg0.class)),
-                Matchers.any(Reg0Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 0)),
-                Matchers.any(Reg0Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg1.class)),
-                Matchers.any(Reg1Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 1)),
-                Matchers.any(Reg1Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg2.class)),
-                Matchers.any(Reg2Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 2)),
-                Matchers.any(Reg2Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg3.class)),
-                Matchers.any(Reg3Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 3)),
-                Matchers.any(Reg3Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg4.class)),
-                Matchers.any(Reg4Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 4)),
-                Matchers.any(Reg4Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg5.class)),
-                Matchers.any(Reg5Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 5)),
-                Matchers.any(Reg5Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg6.class)),
-                Matchers.any(Reg6Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 6)),
-                Matchers.any(Reg6Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg7.class)),
-                Matchers.any(Reg7Codec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 7)),
-                Matchers.any(Reg7Codec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunId.class)),
-                Matchers.any(TunIdCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 16)),
-                Matchers.any(TunIdCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpOp.class)),
-                Matchers.any(ArpOpCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 15)),
-                Matchers.any(ArpOpCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpSha.class)),
-                Matchers.any(ArpShaCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 17)),
-                Matchers.any(ArpShaCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpSpa.class)),
-                Matchers.any(ArpSpaCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 16)),
-                Matchers.any(ArpSpaCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpTha.class)),
-                Matchers.any(ArpThaCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 18)),
-                Matchers.any(ArpThaCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpTpa.class)),
-                Matchers.any(ArpTpaCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 17)),
-                Matchers.any(ArpTpaCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthDst.class)),
-                Matchers.any(EthDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 1)),
-                Matchers.any(EthDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthSrc.class)),
-                Matchers.any(EthSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 2)),
-                Matchers.any(EthSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecap.class)),
+                any(DecapCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg0.class)),
+                any(Reg0Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 0)),
+                any(Reg0Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg1.class)),
+                any(Reg1Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 1)),
+                any(Reg1Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg2.class)),
+                any(Reg2Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 2)),
+                any(Reg2Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg3.class)),
+                any(Reg3Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 3)),
+                any(Reg3Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg4.class)),
+                any(Reg4Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 4)),
+                any(Reg4Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg5.class)),
+                any(Reg5Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 5)),
+                any(Reg5Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg6.class)),
+                any(Reg6Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 6)),
+                any(Reg6Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg7.class)),
+                any(Reg7Codec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 7)),
+                any(Reg7Codec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunId.class)),
+                any(TunIdCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 16)),
+                any(TunIdCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpOp.class)),
+                any(ArpOpCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 15)),
+                any(ArpOpCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpSha.class)),
+                any(ArpShaCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 17)),
+                any(ArpShaCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpSpa.class)),
+                any(ArpSpaCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 16)),
+                any(ArpSpaCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpTha.class)),
+                any(ArpThaCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 18)),
+                any(ArpThaCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpTpa.class)),
+                any(ArpTpaCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 17)),
+                any(ArpTpaCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthDst.class)),
+                any(EthDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 1)),
+                any(EthDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(
+                eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthSrc.class)),
+                any(EthSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 2)),
+                any(EthSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
                 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthType.class)),
-                Matchers.any(EthTypeCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 3)),
-                Matchers.any(EthTypeCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
+                any(EthTypeCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 3)),
+                any(EthTypeCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
                 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Dst.class)),
-                Matchers.any(TunIpv4DstCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 32)),
-                Matchers.any(TunIpv4DstCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
+                any(TunIpv4DstCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 32)),
+                any(TunIpv4DstCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
                 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Src.class)),
-                Matchers.any(TunIpv4SrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 31)),
-                Matchers.any(TunIpv4SrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpSrc.class)),
-                Matchers.any(TcpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 9)),
-                Matchers.any(TcpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpDst.class)),
-                Matchers.any(TcpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 10)),
-                Matchers.any(TcpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpSrc.class)),
-                Matchers.any(UdpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 11)),
-                Matchers.any(UdpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpDst.class)),
-                Matchers.any(UdpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 12)),
-                Matchers.any(UdpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
+                any(TunIpv4SrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 31)),
+                any(TunIpv4SrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpSrc.class)),
+                any(TcpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 9)),
+                any(TcpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpDst.class)),
+                any(TcpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 10)),
+                any(TcpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpSrc.class)),
+                any(UdpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 11)),
+                any(UdpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpDst.class)),
+                any(UdpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 12)),
+                any(UdpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
                 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtState.class)),
-                Matchers.any(CtStateCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 105)),
-                Matchers.any(CtStateCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtZone.class)),
-                Matchers.any(CtZoneCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 106)),
-                Matchers.any(CtZoneCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtMark.class)),
-                Matchers.any(CtMarkCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 107)),
-                Matchers.any(CtMarkCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                        .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
-                                NxmNxCtTpSrc.class)), Matchers.any(CtTpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                        .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
-                                OxmMatchConstants.NXM_1_CLASS, 124)), Matchers.any(CtTpSrcCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                        .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
-                                NxmNxCtTpDst.class)), Matchers.any(CtTpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                        .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
-                                OxmMatchConstants.NXM_1_CLASS, 125)), Matchers.any(CtTpDstCodec.class));
-        Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
-                .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
-                        NxmNxPktMark.class)), Matchers.any(PktMarkCodec.class));
-        Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
-                .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
-                        OxmMatchConstants.NXM_1_CLASS, 33)), Matchers.any(PktMarkCodec.class));
+                any(CtStateCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 105)),
+                any(CtStateCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtZone.class)),
+                any(CtZoneCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 106)),
+                any(CtZoneCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtMark.class)),
+                any(CtMarkCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 107)),
+                any(CtMarkCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
+                                NxmNxCtTpSrc.class)), any(CtTpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+                                OxmMatchConstants.NXM_1_CLASS, 124)), any(CtTpSrcCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
+                                NxmNxCtTpDst.class)), any(CtTpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+                                OxmMatchConstants.NXM_1_CLASS, 125)), any(CtTpDstCodec.class));
+        Mockito.verify(registrator).registerMatchEntrySerializer(eq(
+                new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
+                        NxmNxPktMark.class)), any(PktMarkCodec.class));
+        Mockito.verify(registrator).registerMatchEntryDeserializer(eq(
+                new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+                        OxmMatchConstants.NXM_1_CLASS, 33)), any(PktMarkCodec.class));
         Mockito.verify(registrator).registerActionDeserializer(
-                Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 48)),
-                Matchers.any(DecNshTtlCodec.class));
+                eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 48)),
+                any(DecNshTtlCodec.class));
         Mockito.verify(registrator).registerActionSerializer(
-                Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecNshTtl.class)),
-                Matchers.any(DecNshTtlCodec.class));
+                eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecNshTtl.class)),
+                any(DecNshTtlCodec.class));
 
         // experimenters
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshFlags> nshFlagsSerializerKey = new MatchEntrySerializerKey<>(
@@ -385,160 +387,160 @@ public class NiciraExtensionsRegistratorTest {
                 NxmNxNshFlags.class);
         nshFlagsSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshFlagsSerializerKey),
-                Matchers.any(NshFlagsCodec.class));
+                eq(nshFlagsSerializerKey),
+                any(NshFlagsCodec.class));
         MatchEntryDeserializerKey nshFlagsDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 1);
         nshFlagsDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshFlagsDeserializerKey),
-                Matchers.any(NshFlagsCodec.class));
+                eq(nshFlagsDeserializerKey),
+                any(NshFlagsCodec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshMdtype> mdtypeSerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshMdtype.class);
         mdtypeSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(mdtypeSerializerKey),
-                Matchers.any(NshMdtypeCodec.class));
+                eq(mdtypeSerializerKey),
+                any(NshMdtypeCodec.class));
         MatchEntryDeserializerKey mdtypeDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 2);
         mdtypeDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(mdtypeDeserializerKey),
-                Matchers.any(NshMdtypeCodec.class));
+                eq(mdtypeDeserializerKey),
+                any(NshMdtypeCodec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshNp> nshNpSerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshNp.class);
         nshNpSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshNpSerializerKey),
-                Matchers.any(NshNpCodec.class));
+                eq(nshNpSerializerKey),
+                any(NshNpCodec.class));
         MatchEntryDeserializerKey nshNpDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 3);
         nshNpDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshNpDeserializerKey),
-                Matchers.any(NshNpCodec.class));
+                eq(nshNpDeserializerKey),
+                any(NshNpCodec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNsp> nspSerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNsp.class);
         nspSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nspSerializerKey),
-                Matchers.any(NspCodec.class));
+                eq(nspSerializerKey),
+                any(NspCodec.class));
         MatchEntryDeserializerKey nspDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 4);
         nspDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nspDeserializerKey),
-                Matchers.any(NspCodec.class));
+                eq(nspDeserializerKey),
+                any(NspCodec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNsi> nsiSerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNsi.class);
         nsiSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nsiSerializerKey),
-                Matchers.any(NsiCodec.class));
+                eq(nsiSerializerKey),
+                any(NsiCodec.class));
         MatchEntryDeserializerKey nsiDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 5);
         nsiDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nsiDeserializerKey),
-                Matchers.any(NsiCodec.class));
+                eq(nsiDeserializerKey),
+                any(NsiCodec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc1> nshc1SerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshc1.class);
         nshc1SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshc1SerializerKey),
-                Matchers.any(Nshc1Codec.class));
+                eq(nshc1SerializerKey),
+                any(Nshc1Codec.class));
         MatchEntryDeserializerKey nshc1DeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 6);
         nshc1DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshc1DeserializerKey),
-                Matchers.any(Nshc1Codec.class));
+                eq(nshc1DeserializerKey),
+                any(Nshc1Codec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc2> nshc2SerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshc2.class);
         nshc2SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshc2SerializerKey),
-                Matchers.any(Nshc2Codec.class));
+                eq(nshc2SerializerKey),
+                any(Nshc2Codec.class));
         MatchEntryDeserializerKey nshc2DeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 7);
         nshc2DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshc2DeserializerKey),
-                Matchers.any(Nshc2Codec.class));
+                eq(nshc2DeserializerKey),
+                any(Nshc2Codec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc3> nshc3SerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshc3.class);
         nshc3SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshc3SerializerKey),
-                Matchers.any(Nshc3Codec.class));
+                eq(nshc3SerializerKey),
+                any(Nshc3Codec.class));
         MatchEntryDeserializerKey nshc3DeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 8);
         nshc3DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshc3DeserializerKey),
-                Matchers.any(Nshc3Codec.class));
+                eq(nshc3DeserializerKey),
+                any(Nshc3Codec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc4> nshc4SerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshc4.class);
         nshc4SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshc4SerializerKey),
-                Matchers.any(Nshc4Codec.class));
+                eq(nshc4SerializerKey),
+                any(Nshc4Codec.class));
         MatchEntryDeserializerKey nshc4DeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 9);
         nshc4DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshc4DeserializerKey),
-                Matchers.any(Nshc4Codec.class));
+                eq(nshc4DeserializerKey),
+                any(Nshc4Codec.class));
         MatchEntrySerializerKey<ExperimenterClass, NxmNxNshTtl> nshTtlSerializerKey = new MatchEntrySerializerKey<>(
                 EncodeConstants.OF13_VERSION_ID,
                 ExperimenterClass.class,
                 NxmNxNshTtl.class);
         nshTtlSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntrySerializer(
-                Matchers.eq(nshTtlSerializerKey),
-                Matchers.any(NshTtlCodec.class));
+                eq(nshTtlSerializerKey),
+                any(NshTtlCodec.class));
         MatchEntryDeserializerKey nshTtlDeserializerKey = new MatchEntryDeserializerKey(
                 EncodeConstants.OF13_VERSION_ID,
                 OxmMatchConstants.EXPERIMENTER_CLASS,
                 10);
         nshTtlDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
         Mockito.verify(registrator).registerMatchEntryDeserializer(
-                Matchers.eq(nshTtlDeserializerKey),
-                Matchers.any(NshTtlCodec.class));
+                eq(nshTtlDeserializerKey),
+                any(NshTtlCodec.class));
     }
 
     @Test
index ec07c1f8365a2a07e564b031b8e66cd7f4b5abcd..3d4f1d79a9a455a70cd4ec1679cc00fb7e594a3b 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowjava.nx.codec.action;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.when;
 
@@ -80,7 +80,7 @@ public class RegLoad2CodecTest {
         final MatchEntry matchEntry = new MatchEntryBuilder().build();
         when(deserializerRegistry.getDeserializer(key)).thenReturn(ofDeserializer);
         when(ofDeserializer.deserialize(byteBuf)).thenAnswer(invocationOnMock -> {
-            invocationOnMock.getArgumentAt(0, ByteBuf.class).skipBytes(8);
+            invocationOnMock.<ByteBuf>getArgument(0).skipBytes(8);
             return matchEntry;
         });
 
index 82847197e2b6d3739a4bc4f7eaf98ca9ca2d7573..071c998142a4812849db4d8db57bf9b47ec55ef5 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 42320ce5364ff5e714e69daf3ede7ba0a99364d9..dfd68766cd91bc7a5cc603df085a770a153f2522 100644 (file)
@@ -66,7 +66,7 @@ public class RegConvertor implements ConvertorToOFJava<MatchEntry>, ConvertorFro
             String msg = input.getOxmMatchField()
                     + " does not implement "
                     + org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg.class;
-            LOG.warn(msg);
+            LOG.warn("Warning {}",msg);
             throw new IllegalStateException(msg);
         }
         nxRegBuilder.setReg((Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match
index 6396247e772b2ebfb52b0743b480065aae12240c..226adedc11bb76b8e08cf52c3623ec91ec572d75 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowplugin.extension.vendor.nicira;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -45,8 +45,8 @@ public class NiciraExtensionProviderTest {
     @Test
     public void testRegisterConverters() throws Exception {
         Mockito.verify(extensionConverterRegistrator, Mockito.atLeastOnce()).registerActionConvertor(
-                Matchers.<TypeVersionKey<? extends Action>>any(),
-                Matchers.<ConvertorActionToOFJava<Action, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow
+                ArgumentMatchers.<TypeVersionKey<? extends Action>>any(),
+                ArgumentMatchers.<ConvertorActionToOFJava<Action, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow
                     .common.action.rev150203.actions.grouping.Action>>any());
     }
 }
index 7793a271f85d59d59aa50f629d1275547291abeb..d1087596fef787be2fe7ce7258842a7e9f9c7e5c 100644 (file)
@@ -8,8 +8,6 @@
 
 package org.opendaylight.openflowplugin.extension.vendor.nicira.convertor.action;
 
-import static org.mockito.Mockito.when;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -45,12 +43,9 @@ public class CtClearConvertorTest {
     @Before
     public void setUp() throws Exception {
         final NxCtClear nxCtClear = Mockito.mock(NxCtClear.class);
-        when(actionsCase.getNxCtClear()).thenReturn(nxCtClear);
 
         final ActionCtClear actionCtClear = Mockito.mock(ActionCtClear.class);
         final NxActionCtClear nxActionCtClear = Mockito.mock(NxActionCtClear.class);
-        when(actionCtClear.getNxActionCtClear()).thenReturn(nxActionCtClear);
-        when(action.getActionChoice()).thenReturn(actionCtClear);
 
         ctClearConvertor = new CtClearConvertor();
     }
index aaa9390d1d67029298e40d2f83d997a2fed75293..003c64eacd19857b6a99a548bcd21d64b4ecda4b 100644 (file)
@@ -8,8 +8,6 @@
 
 package org.opendaylight.openflowplugin.extension.vendor.nicira.convertor.action;
 
-import static org.mockito.Mockito.when;
-
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -38,12 +36,9 @@ public class DecNshTtlConvertorTest {
     @Before
     public void setUp() throws Exception {
         NxDecNshTtl nxDecNshTtl = Mockito.mock(NxDecNshTtl.class);
-        when(actionsCase.getNxDecNshTtl()).thenReturn(nxDecNshTtl);
 
         NxActionDecNshTtl nxActionDecNshTtl = Mockito.mock(NxActionDecNshTtl.class);
         ActionDecNshTtl actionDecNshTtl = Mockito.mock(ActionDecNshTtl.class);
-        when(actionDecNshTtl.getNxActionDecNshTtl()).thenReturn(nxActionDecNshTtl);
-        when(action.getActionChoice()).thenReturn(actionDecNshTtl);
 
         decNshTtlConvertor = new DecNshTtlConvertor();
     }
index f6d9a9677674cb508754dc9acb302941788cd070..1966331af4bcf05f9bc2b4d66999846ac3d0d7e5 100644 (file)
@@ -63,7 +63,6 @@ public class RegMoveConvertorTest {
         when(nxRegMove.getSrc()).thenReturn(src);
         when(nxRegMove.getDst()).thenReturn(dst);
         when(nxRegMove.getSrc().getStart()).thenReturn(1);
-        when(nxRegMove.getSrc().getEnd()).thenReturn(2);
         when(nxRegMove.getDst().getStart()).thenReturn(3);
         when(nxRegMove.getDst().getEnd()).thenReturn(4);
         when(nxRegMove.getDst().getDstChoice()).thenReturn(new DstNxTunIdCaseBuilder().build());
index 16b5ad4902b18cdb03d16b28feea224066718a84..9a73c93ec22fcc16e5130ffc20501292adef036f 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -64,7 +64,7 @@ public class ArpOpConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpOp(nxmOfArpOpBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(extensionAugmentation);
 
         final MatchEntry converted = arpOpConvertor.convert(extension);
index 572af6193753d6bee6913578eb35239c322184e4..691962727b996b630b585e9716fdab103610dfb8 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -61,7 +61,7 @@ public class ArpShaConvertorTest {
                 .setNxmNxArpSha(nxmNxArpShaBuilder.build());
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
 
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpShaConvertor = new ArpShaConvertor();
index d862b0b2ade2b8dae3fee835b0c15b4bc3152da0..8edc67b54778076689c5a13666479462aacffe67 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -63,7 +63,7 @@ public class ArpSpaConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpSpa(nxmOfArpSpaBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(extensionAugmentation);
 
         final MatchEntry converted = arpSpaConvertor.convert(extension);
index 7e13f66cbc11b97813cc86646fe88f53b43be007..b12ddf6e0b96538d3f0a8bd00275d73666f9ab1b 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class ArpThaConvertorTest {
                 .setNxmNxArpTha(nxArpThaBuilder.build());
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
 
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpThaConvertor = new ArpThaConvertor();
index 2627186e27720e2631cc7021e31ccf927161c281..54ab65f895f0948b0548eeb34161a493af0654b4 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -59,7 +59,7 @@ public class ArpTpaConvertorTest {
         nxAugMatchRpcAddFlowBuilder.setNxmOfArpTpa(nxmOfArpTpaBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchRpcAddFlowBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         arpTpaConvertor = new ArpTpaConvertor();
index 5e6f651aa408ed8faca4441624615bee2e4333a2..74bc6092d8542f4d662b6d3bf859405de5a701a2 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -57,7 +57,7 @@ public class CtStateConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtState(nxmNxCtStateBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ctStateConvertor = new CtStateConvertor();
index 91a5c39186cdc0345fbbc00633faa7899c57a4f4..91de7ef96a290b05ee43d717f07cecf4a20c52d7 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -56,7 +56,7 @@ public class CtZoneConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtZone(nxmNxCtZoneBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ctZoneConvertor = new CtZoneConvertor();
index f9c1a8c9853c15b7fda52c8c7b6519fba77137a5..a22f935ce2c8a34e2f6b7c7b60b04129b554793c 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -59,7 +59,7 @@ public class EthDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthDst(nxmOfEthDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethDstConvertor = new EthDstConvertor();
index 7c1461a380d3b2ca5d5210a941cba5321d443d4c..5bbd43602f9551e3ce0eaf12093d513830ea446f 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class EthSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthSrc(nxmOfEthSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethSrcConvertor = new EthSrcConvertor();
index 6e4e3a37f28ef70a87b46fe1e78b0c18d981c461..cf79ad901d0abeba2a928b6f8432072843ff98f6 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -56,7 +56,7 @@ public class EthTypeConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfEthType(nxmOfEthTypeBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         ethTypeConvertor = new EthTypeConvertor();
index fe94f6857bf48ecbfff3f79e09994f6df1b453f2..24c821ee56d30e59703c5f5dca7836d41151e774 100644 (file)
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.when;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -53,7 +53,7 @@ public class NshFlagsConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshFlags(nxmNxNshFlags)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         convertor = new NshFlagsConvertor();
index bfc2f5cee8096b690efeed2db5497aecc4010e2c..53589832cf3e305fcc2aab36e5865e14cfd8578c 100644 (file)
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.when;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -52,7 +52,7 @@ public class NshMdtypeConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshMdtype(nxmNxNshMdtype)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         convertor = new NshMdtypeConvertor();
index 17f78a9fa13543388fa55513dc23eabe08fae655..accbe716f46858edd1801ddfc8194c5cfe8bb019 100644 (file)
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.when;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -52,7 +52,7 @@ public class NshNpConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshNp(nxmNxNshNp)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         convertor = new NshNpConvertor();
index a2a3047c4c832156bc61ef840efcca34174dc4b8..9e77190cce1395304501a3668ccbc8c1e6135b57 100644 (file)
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.when;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -51,7 +51,7 @@ public class NshTtlConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshTtl(nxmNxNshTtl)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         convertor = new NshTtlConvertor();
index 2cff7c0984e0ee1f167db1465ed82d5094d721f1..bf38808704ff07b004bc65d3f67dee67f9a15955 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -54,7 +54,7 @@ public class Nshc1ConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshc1(nxmNxNshc1)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nshc1Convertor = new Nshc1Convertor();
index 513c36c3429ffb0ba4fd3b4401c21ee649623d1e..6ebdcc54b56987430b1ebde810005b1b791c3bcc 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -54,7 +54,7 @@ public class Nshc2ConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshc2(nxmNxNshc2)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nshc2Convertor = new Nshc2Convertor();
index 84de5bc83651a60cdbbb93c517b17934a766e690..c7992686971dde1e8c1b036dc9476e1ca65c9135 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -54,7 +54,7 @@ public class Nshc3ConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshc3(nxmNxNshc3)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nshc3Convertor = new Nshc3Convertor();
index aa369ba4db955aa83a777707b72a62e645e808e5..6ffc7077c9e3bba3b5c8d96a6b4761aac4f43217 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -54,7 +54,7 @@ public class Nshc4ConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNshc4(nxmNxNshc4)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nshc4Convertor = new Nshc4Convertor();
index eb5bdac235f14c3474ab229fd04bd7eb9e3c9519..1bfdff2fe3c7a1e13b4e121762e9458a8d0ef5a6 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -53,7 +53,7 @@ public class NsiConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNsi(nxmNxNsi)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nsiConvertor = new NsiConvertor();
index b611a2165e8b3671ed6d3f94ccda455867dd6d10..655bb70d524cd6b38a95591a047b747faa3898e2 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
@@ -53,7 +53,7 @@ public class NspConvertorTest {
         NxAugMatchNodesNodeTableFlow nxAugMatchNotifUpdateFlowStats = new NxAugMatchNodesNodeTableFlowBuilder()
                 .setNxmNxNsp(nxmNxNsp)
                 .build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
                 .thenReturn(nxAugMatchNotifUpdateFlowStats);
 
         nspConvertor = new NspConvertor();
index ea49b245a7a534f52ab6b170dd821e1bcfff1624..ba3410d7f90c80b14f8bb5992f3891ccc412457c 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class TcpDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpDst(nxmOfTcpDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tcpDstConvertor = new TcpDstConvertor();
index 3cb536215a26117cccae9a9f872b7bb37f682ee0..db7682b5c83b4e812c31eae49054c57193e5320b 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class TcpSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfTcpSrc(nxmOfTcpSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tcpSrcConvertor = new TcpSrcConvertor();
index 12e6ec2a4144838f2fedce54b598ef2cce2677be..8c040a0c739ae712f58957066eaeb351a104550e 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class TunIPv4DstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Dst(nxmNxTunIpv4DstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIPv4DstConvertor = new TunIPv4DstConvertor();
index bd370c1ef1dbb3561ea28ff148b7cc711ae62d65..e650aae40dd899cae8acc49bf484adfa67899aef 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class TunIPv4SrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunIpv4Src(nxmNxTunIpv4SrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIPv4DstConvertor = new TunIPv4SrcConvertor();
index 4fde6b6173d26825c4728c8452e97d02b0c5ff0e..45e7b4cb8acc7cf7d314bf59bad9ad5efc2e441b 100644 (file)
@@ -15,7 +15,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -55,7 +55,7 @@ public class TunIdConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxTunId(nxmNxTunIdBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         tunIdConvertor = new TunIdConvertor();
index 08b8734900f8b7f3fe609db9a0a896af872287fc..d6a914bc96b8bd7ebe63297251f5ff656a6ffc25 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class UdpDstConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpDst(nxmOfUdpDstBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         udpDstConvertor = new UdpDstConvertor();
index ed5e149de2ce8cd84cb5ed5f4f13542b30234491..a73ec77162ed75ae44ff64a0fa9b51f8f6de7ff0 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.extension.api.ExtensionAugment;
@@ -58,7 +58,7 @@ public class UdpSrcConvertorTest {
         nxAugMatchNotifUpdateFlowStatsBuilder.setNxmOfUdpSrc(nxmOfUdpSrcBuilder.build());
 
         final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
-        when(extension.augmentation(Matchers.<Class<Augmentation<Extension>>>any()))
+        when(extension.augmentation(ArgumentMatchers.<Class<Augmentation<Extension>>>any()))
             .thenReturn(extensionAugmentation);
 
         udpSrcConvertor = new UdpSrcConvertor();
index d3fbcfab7a91d4f351c06d12cb31facb2ce7bdf1..d5049645c5d1cb0896391bba5da1ed9e02c152ed 100644 (file)
@@ -6,9 +6,7 @@
  terms of the Eclipse Public License v1.0 which accompanies this distribution,
  and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
         <artifactId>openflowplugin-extension-parent</artifactId>
@@ -62,4 +60,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>
index 554b2d6035cdb570c162271e88baacaf88cb319c..14eeae14d127d400a0f72b6b130a9ea9398db7b5 100644 (file)
@@ -8,11 +8,12 @@
 
 package org.opendaylight.openflowplugin.extension.onf.deserializer;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -72,7 +73,7 @@ public class BundleControlFactoryTest {
                                                        + "00 00 " // type 2
                                                        + "00 04 " // length 2
                                                        + "00 00 00 00"); // data 2
-        Mockito.when(registry.getDeserializer(Matchers.any(MessageCodeKey.class)))
+        Mockito.when(registry.getDeserializer(any(MessageCodeKey.class)))
                 .thenReturn(experimenterPropertyDeserializer);
         ((DeserializerRegistryInjector)factory).injectDeserializerRegistry(registry);
         BundleControlOnf builtByFactory = factory.deserialize(buffer);
index 03e65735ddea631d15eb41996b057c6735dfabaf..7b117b26e2d360f372e4e2fa60d4120c4fbaa504 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.extension.onf.serializer;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import java.util.ArrayList;
@@ -15,7 +17,6 @@ import java.util.Collections;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -86,11 +87,11 @@ public class BundleAddMessageFactoryTest extends AbstractBundleMessageFactoryTes
         if (withProperty) {
             dataBuilder.setBundleProperty(new ArrayList<>(Collections.singleton(
                     BundleTestUtils.createExperimenterProperty(propertyExperimenterData))));
-            Mockito.when(registry.getSerializer(Matchers.any()))
+            Mockito.when(registry.getSerializer(any()))
                     .thenReturn(caseSerializer)
                     .thenReturn(propertySerializer);
         } else {
-            Mockito.when(registry.getSerializer(Matchers.any())).thenReturn(caseSerializer);
+            Mockito.when(registry.getSerializer(any())).thenReturn(caseSerializer);
         }
 
         builder.setOnfAddMessageGroupingData(dataBuilder.build());
@@ -102,7 +103,7 @@ public class BundleAddMessageFactoryTest extends AbstractBundleMessageFactoryTes
         Assert.assertEquals("Wrong bundle ID", 1L, out.readUnsignedInt());
         long padding = out.readUnsignedShort();
         Assert.assertEquals("Wrong flags", 1, out.readUnsignedShort());
-        Mockito.verify(caseSerializer).serialize(Mockito.any(), Mockito.any());
+        Mockito.verify(caseSerializer).serialize(any(), any());
 
         if (withProperty) {
             Mockito.verify(propertySerializer).serialize(propertyExperimenterData, out);
index ae873962710e2c9dfa0924f7b14cacc69b4fc950..15210b600bad5dd040467147fbf99a27d08433db 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.extension.onf.serializer;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import java.util.ArrayList;
@@ -15,7 +17,6 @@ import java.util.Collections;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
@@ -56,7 +57,7 @@ public class BundleControlFactoryTest extends AbstractBundleMessageFactoryTest {
         if (withProperty) {
             dataBuilder.setBundleProperty(new ArrayList<>(Collections.singleton(
                     BundleTestUtils.createExperimenterProperty(propertyExperimenterData))));
-            Mockito.when(registry.getSerializer(Matchers.any())).thenReturn(propertySerializer);
+            Mockito.when(registry.getSerializer(any())).thenReturn(propertySerializer);
             ((SerializerRegistryInjector) factory).injectSerializerRegistry(registry);
         }
 
index 55d114861d3e0107ad1aa8f8b16abb4645e4e234..61b2e1795c7ae073b8dd0d8027d85ac33dc42201 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 7e3eab2822421de0944e07c04db7c4631a20f8b3..47cfc2f0abe7592e6349745b8f97b9080d5262f4 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.openflowplugin</groupId>
index d263e18fe7dbe440f6a918c601d636d72a8c68b2..b8c9dde45085ec9ffd71171fbe37ab9b803b3e35 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 20171a8f4e685820e2043da512b306ce31bf5f8b..d553ee062fcfff7a5c2428fa297779c23158ce1c 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 2220becbd1fe9abbeb741478363570bfaf5dba9e..0bd6bdd357a92755b0cd8751e5e4932205bb5a86 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 710e09e6429bf400473f9caccc46570ff487949d..9a6369e92a753429bbca396f3e585963d42077c3 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 37a1fe84e2f82dfd6a0c8edee0a050b702917fb1..92d14fcc717d264c8eb5491b9997bb57a9f5d187 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 2a74460c1f0f83417a7007fd017847c2cc42f422..97d6fd45b3ea1259604be8d02f8a3b578ee1b343 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index ab7d07cb6041ce7a2a677e17648a016dbae033ac..782440e2ba824293027e7c139a1605806a418dee 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index d1ff8168bc288253c39c8065d49ca0424e3d4975..ae79eca340890acdc53a8de6dfba2f0948af6bde 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 2bc24452594248821d88727676616854b9e52604..ec65f66ce7dfce8bd0d51b5d65ca20ea7e354187 100644 (file)
@@ -4,7 +4,7 @@
 <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
 </parent>
 
index 5fe179cf2339f3bad2ed12dc39fa60a2623d271e..ddd56e564cbc890cf4958f908252cae7eb26763e 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 5f7cc99f4bc59ab36e49546e1ecdeae627e16fa0..fb0d043ad1344fde40b8bd09849ee4ca82d3cda3 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 42a6197220a5ab82f0e960dd4fe650c0bb6a1799..551bff49a79fee317ff89c081a6f8bc02a61b215 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 6d92e46aa19d9724cd1fd7efc9d33050ab4db5e2..962d494cadbd77892ee724b72a7aa43881721ba0 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index eacdd8b69df62c56aa39609c8d64d699226d70f9..e5262b148c0e35a7753156af5265598d148f47ac 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index a89974d2497592a0924a754e9a632b17778355cf..422b223ac0f82a13fc46b27ae97f3cec53dfbb44 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index ea06ff2c25df7a2eaa893e2b8055ff18ccbb0a3f..731f4ae9b0be2613e20df9dc4cf08dc0ac4b6283 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 2ffd89927b149ea1184339143b74eb7259feeb18..2cd84f0c5a3fdfffe93475397df95973cd0f86d2 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index ea5447210b0b8f1874de2f6e53021c4d85c5a8b9..0a42c4c2816ec64a2aae8440443b4fc48802865f 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -18,7 +18,7 @@
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl-guava-23</artifactId>
+            <artifactId>odl-guava</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index cbf030d579e8e6c98acb1aa0525cab919a74906b..caa5966092e1a3463d59bec96f20650a38a4ddb6 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-openflowplugin-libraries">
     <feature name="odl-openflowplugin-libraries">
-        <feature version="[3.0.0,4)">odl-guava-23</feature>
+        <feature version="[4,5)">odl-guava</feature>
     </feature>
 </features>
index 8bdd5a5e6d7c48950b5cf90a0ca18e1b1dbe8c6c..94f9252c35acd6e708723f8892091319bbc89d6f 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -21,7 +21,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 3b55cb12683b24022ed70fe03ee9af2027c1291b..38e01972178148042d66e68187c8f8ba32990f87 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index a04b584d2a3994f48d78b4999b8910ed2755457b..0cddbc15c60c3c4cd94d5da626d354905a437ed5 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 99ddca1aa8ced08c46098e1d376264c37a854792..b785890d4d602aac9b92adf30579d6a2e9952fbf 100644 (file)
@@ -58,4 +58,4 @@
     <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
     <tag>HEAD</tag>
   </scm>
-</project>
\ No newline at end of file
+</project>
index 6d9ff899c7534cb44b939fc20ad91c0690514b3a..b377bdcbfe2307f7ed813d8311996e148b22bfa5 100644 (file)
@@ -19,7 +19,7 @@ import org.slf4j.LoggerFactory;
  * convert primitive data types to stream of bits.
  */
 public abstract class BitBufferHelper {
-    protected static final Logger LOG = LoggerFactory.getLogger(BitBufferHelper.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BitBufferHelper.class);
 
     public static final long BYTE_MASK = 0xFF;
 
index 0e10b316f112a9113c2fefec7568d816144ad335..cc799eb6b1bc662b91574b293d25a548bffedade 100644 (file)
@@ -13,11 +13,14 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class that represents the LLDP frame objects.
  */
 public class LLDP extends Packet {
+    private static final Logger LOG = LoggerFactory.getLogger(LLDP.class);
     private static final String CHASSISID = "ChassisId";
     private static final String SYSTEMNAMEID = "SystemNameID";
     private static final String PORTID = "PortId";
index 6f3bfd339d78d721cde4a054d1580e80ec06d8c1..71bd964d664ebace40974b92262c1d4387285b9b 100644 (file)
@@ -18,12 +18,15 @@ import java.util.Map;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.tuple.MutablePair;
 import org.apache.commons.lang3.tuple.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Class that represents the LLDPTLV objects.
  */
 @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
 public class LLDPTLV extends Packet {
+    private static final Logger LOG = LoggerFactory.getLogger(LLDPTLV.class);
     private static final String TYPE = "Type";
     private static final String LENGTH = "Length";
     private static final String VALUE = "Value";
index 1425f0b7b385b8240dc96c54bfe71b1ed549c7d0..1aa1163f8faca52fa50600ffb90cecf1d7fc6602 100644 (file)
@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
  * Utility class containing the common utility functions needed for operating on networking data structures.
  */
 public abstract class NetUtils {
-    protected static final Logger LOG = LoggerFactory.getLogger(NetUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(NetUtils.class);
 
     /**
      * Constant holding the number of bits in a byte.
index 271a77d54ac0a57b7b2dfddbb959d435c8c9c83c..1516749232ad1d6f07bce1b92dd72ffe904ef002 100644 (file)
@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class Packet {
 
-    protected static final Logger LOG = LoggerFactory.getLogger(Packet.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Packet.class);
 
     // Access level granted to this packet
     protected boolean writeAccess;
@@ -195,7 +195,7 @@ public abstract class Packet {
         postSerializeCustomOperation(packetBytes);
 
         if (LOG.isTraceEnabled()) {
-            LOG.trace("{}: {}", this.getClass().getSimpleName(),
+            LOG.trace("packet {}: {}", this.getClass().getSimpleName(),
                     HexEncode.bytesToHexString(packetBytes));
         }
 
index 18b0292afeeafd118270272a68ca906dcec2ee5a..acd5e9e18b64b944b6bc7a97a771a17b88924ffb 100644 (file)
@@ -29,8 +29,8 @@
       <artifactId>yang-common</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>ietf-inet-types-2013-07-15</artifactId>
+      <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+      <artifactId>rfc6991</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
index e99e6e9d04bfe04c77afe04a96807f1820e4bd8f..ea452269d0637d1973132d49785c2b95a2ee36f8 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>feature-repo-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index fdcbb7751efe9b3d339a84966118b4a4f9becc41..72c244227c0657cd5fb015a1020be0f6c6aff1ca 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -33,7 +33,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 74d274014f08d7a0351db9592176a6509401a95a..da054ad272efb562c9b5e985dfc2f3cc93158e0c 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index ef34bb6c3fdbabeb138430bad5881024d4da37aa..16db447019c63a6a41f2cf9c966d4531403b3c54 100644 (file)
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
             <artifactId>yang-common</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-inet-types-2013-07-15</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-yang-types-20130715</artifactId>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc6991</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
index d0ba023561cee6c844472472a23ba22f9985cff8..29a3afb80b2399ab796c3548f928ad8944de7925 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 3069ea369e73cdefab3098080bf4dd2f7faf88dc..b46c46f56628399fc1e82167b5d1176af1421ea4 100644 (file)
@@ -92,8 +92,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
         int code = rawMessage.readUnsignedShort();
         if (type != null) {
             switch (type) {
-                case HELLOFAILED:
-                {
+                case HELLOFAILED: {
                     HelloFailedCode errorCode = HelloFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -102,8 +101,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case BADREQUEST:
-                {
+                case BADREQUEST: {
                     BadRequestCode errorCode = BadRequestCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -112,8 +110,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case BADACTION:
-                {
+                case BADACTION: {
                     BadActionCode errorCode = BadActionCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -122,8 +119,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case BADINSTRUCTION:
-                {
+                case BADINSTRUCTION: {
                     BadInstructionCode errorCode = BadInstructionCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -132,8 +128,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case BADMATCH:
-                {
+                case BADMATCH: {
                     BadMatchCode errorCode = BadMatchCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -142,8 +137,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case FLOWMODFAILED:
-                {
+                case FLOWMODFAILED: {
                     FlowModFailedCode errorCode = FlowModFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -152,8 +146,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case GROUPMODFAILED:
-                {
+                case GROUPMODFAILED: {
                     GroupModFailedCode errorCode = GroupModFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -162,8 +155,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case PORTMODFAILED:
-                {
+                case PORTMODFAILED: {
                     PortModFailedCode errorCode = PortModFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -172,8 +164,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case TABLEMODFAILED:
-                {
+                case TABLEMODFAILED: {
                     TableModFailedCode errorCode = TableModFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -182,8 +173,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case QUEUEOPFAILED:
-                {
+                case QUEUEOPFAILED: {
                     QueueOpFailedCode errorCode = QueueOpFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -192,8 +182,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case SWITCHCONFIGFAILED:
-                {
+                case SWITCHCONFIGFAILED: {
                     SwitchConfigFailedCode errorCode = SwitchConfigFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -202,8 +191,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case ROLEREQUESTFAILED:
-                {
+                case ROLEREQUESTFAILED: {
                     RoleRequestFailedCode errorCode = RoleRequestFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -212,8 +200,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case METERMODFAILED:
-                {
+                case METERMODFAILED: {
                     MeterModFailedCode errorCode = MeterModFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -222,8 +209,7 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
                     }
                     break;
                 }
-                case TABLEFEATURESFAILED:
-                {
+                case TABLEFEATURESFAILED: {
                     TableFeaturesFailedCode errorCode = TableFeaturesFailedCode.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
index adfafe630c587709d6600be38aad39a2237eefa7..b9cd3b3dbcedc056f872d78aa04f20d379453250 100644 (file)
@@ -64,8 +64,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
         int code = rawMessage.readUnsignedShort();
         if (type != null) {
             switch (type) {
-                case HELLOFAILED:
-                {
+                case HELLOFAILED: {
                     HelloFailedCodeV10 errorCode = HelloFailedCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -74,8 +73,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
                     }
                     break;
                 }
-                case BADREQUEST:
-                {
+                case BADREQUEST: {
                     BadRequestCodeV10 errorCode = BadRequestCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -84,8 +82,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
                     }
                     break;
                 }
-                case BADACTION:
-                {
+                case BADACTION: {
                     BadActionCodeV10 errorCode = BadActionCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -94,8 +91,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
                     }
                     break;
                 }
-                case FLOWMODFAILED:
-                {
+                case FLOWMODFAILED: {
                     FlowModFailedCodeV10 errorCode = FlowModFailedCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -104,8 +100,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
                     }
                     break;
                 }
-                case PORTMODFAILED:
-                {
+                case PORTMODFAILED: {
                     PortModFailedCodeV10 errorCode = PortModFailedCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
@@ -114,8 +109,7 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
                     }
                     break;
                 }
-                case QUEUEOPFAILED:
-                {
+                case QUEUEOPFAILED: {
                     QueueOpFailedCodeV10 errorCode = QueueOpFailedCodeV10.forValue(code);
                     if (errorCode != null) {
                         setCode(builder, errorCode.getIntValue(), errorCode.name());
index c323569a923ab2282de67c3424dfcdc3ce4f88f2..52cadd7e9332aa7c133436d0f90613afa1371f63 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowjava.protocol.impl.core;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
index 83cf468643da1d91a142b58fa4a9b1fa6c537273..3bb1a5da3b31e3e7c6bfa175c54974be709d1654 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowjava.protocol.impl.core;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
@@ -17,6 +17,7 @@ import java.util.concurrent.TimeUnit;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.system.rev130927.SwitchIdleEvent;
 
@@ -48,7 +49,7 @@ public class IdleHandlerTest {
         idleHandler.channelRead(mockChHndlrCtx, new Object());
 
         // Verify that a read was fired for the next handler ...
-        verify(mockChHndlrCtx, times(1)).fireChannelRead(any(SwitchIdleEvent.class)) ;
+        verify(mockChHndlrCtx, times(1)).fireChannelRead(Mockito.<SwitchIdleEvent>any()) ;
     }
 
     /**
index 9a454f0d8b53286860e4e174f7d8525cd7bd7de3..da6a108b979e45322eac380fbb0986da02c6641d 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.core;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyShort;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyShort;
 import static org.mockito.Mockito.when;
 
 import io.netty.buffer.ByteBuf;
index ab0b2272816a2f069baebc41b1021e22b32bc5b4..a36b72917a89b9d5225577eeb0c00a640fc83213 100644 (file)
@@ -9,8 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.core;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyShort;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyShort;
 import static org.mockito.Mockito.when;
 
 import io.netty.buffer.ByteBuf;
index d13274b5c7fb9e50690eb8341ab45d2d79e0a9fe..29b1e27f97b333684e6748515efcaf9d599ef0c6 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.core;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyShort;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyShort;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.when;
 
index fc6477ea2a042debcb43e6e3ae206feaab2e57c2..1ef3ac8439101ece40c2da59eefa8adbf2748025 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.openflowjava.protocol.impl.core;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyShort;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyShort;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
index 70cdef5d034f264231697d187c18fbc30047a0dc..71c23a28f2d6194241e2de9cd19aec3b7b3f3f67 100644 (file)
@@ -9,8 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.core;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
index 0aa09a3726c8687041f273eebbea4f3f811fa728..53f42a6e02108d5886fd250f0f720782b2384882 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowjava.protocol.impl.core.connection;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
index 7edff8ed4361fd0cb196e193394b29831808836e..99b50600a3189b12ab6408758738eea80d491e42 100644 (file)
@@ -31,7 +31,7 @@ public class BarrierReplyMessageFactoryTest extends DefaultDeserializerFactoryTe
      * Initializes deserializer registry and lookups OF13 deserializer.
      */
     public BarrierReplyMessageFactoryTest() {
-       super(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 21, BarrierOutput.class));
+        super(new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, 21, BarrierOutput.class));
     }
 
     /**
index babe84bc4df73a411532070ba835098637f57aaf..1bf1a280b6d03f1dd39448a5f2b72471b93fb160 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -42,7 +43,7 @@ public class ErrorMessageFactoryTest {
     @Before
     public void startUp() {
         errorFactory = new ErrorMessageFactory();
-        Mockito.when(registry.getDeserializer(Matchers.any(MessageCodeKey.class))).thenReturn(deserializer);
+        Mockito.when(registry.getDeserializer(any(MessageCodeKey.class))).thenReturn(deserializer);
         errorFactory.injectDeserializerRegistry(registry);
     }
 
index b03664a55e0e2cc723e0fecd27a9ec961105a247..535c6fc4227b6d4becc961d62869f0ff81a31b8c 100644 (file)
@@ -12,7 +12,7 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -36,7 +36,7 @@ public class VendorMessageFactoryTest {
      */
     @Test
     public void test() {
-        Mockito.when(registry.getDeserializer(Matchers.<MessageCodeKey>any())).thenReturn(deserializer);
+        Mockito.when(registry.getDeserializer(ArgumentMatchers.<MessageCodeKey>any())).thenReturn(deserializer);
         ByteBuf buffer = ByteBufUtils.hexStringToByteBuf("01 02 03 04 FF FF FF FF 80 00 00 00");
         VendorMessageFactory factory = new VendorMessageFactory();
         factory.injectDeserializerRegistry(registry);
index 181b9afb5889933ca9fbfaab25490a51367e443c..ae486661081c4261c79b5f20ceef106e278b7270 100644 (file)
@@ -12,7 +12,7 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -43,7 +43,7 @@ public class MultipartReplyExperimenterTest {
      */
     @Test
     public void testMultipartReplyExperimenter() {
-        Mockito.when(registry.getDeserializer(Matchers.<MessageCodeKey>any())).thenReturn(vendorDeserializer);
+        Mockito.when(registry.getDeserializer(ArgumentMatchers.<MessageCodeKey>any())).thenReturn(vendorDeserializer);
         factory.injectDeserializerRegistry(registry);
         ByteBuf bb = BufferHelper.buildBuffer("FF FF 00 01 00 00 00 00 "
                                             + "00 00 00 01 00 00 00 02"); // expID, expType
index 8acaab7135344534027c8dd8f883a936975eed39..5120079aba9ab1cda84d38e3bd4acb5276cf98ba 100644 (file)
@@ -12,7 +12,7 @@ import io.netty.buffer.ByteBuf;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -40,7 +40,7 @@ public class OF10StatsReplyExperimenterTest {
      */
     @Test
     public void test() {
-        Mockito.when(registry.getDeserializer(Matchers.<MessageCodeKey>any())).thenReturn(vendorDeserializer);
+        Mockito.when(registry.getDeserializer(ArgumentMatchers.<MessageCodeKey>any())).thenReturn(vendorDeserializer);
         OF10StatsReplyMessageFactory factory = new OF10StatsReplyMessageFactory();
         factory.injectDeserializerRegistry(registry);
 
index 27ac8f8cf8a877945f796ec36f7889085c076d87..eb7cdc1134b4c9f879ce1d153afc0bbd1d8c17ea 100644 (file)
@@ -8,9 +8,10 @@
 
 package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
@@ -108,7 +109,7 @@ public class ExperimenterInputMessageFactoryTest {
         ExperimenterInput input = builder.build();
 
         Mockito.when(registry.getSerializer(
-                (ExperimenterIdSerializerKey<?>) Matchers.any())).thenReturn(serializer);
+                (ExperimenterIdSerializerKey<?>) any())).thenReturn(serializer);
 
         expFactory.serialize(input, out);
         Mockito.verify(serializer, Mockito.times(1)).serialize(input.getExperimenterDataOfChoice(), out);
@@ -129,7 +130,7 @@ public class ExperimenterInputMessageFactoryTest {
         ExperimenterInput input = builder.build();
 
         Mockito.when(registry.getSerializer(
-                (ExperimenterIdSerializerKey<?>) Matchers.any())).thenReturn(serializer);
+                (ExperimenterIdSerializerKey<?>) any())).thenReturn(serializer);
 
         expFactory.serialize(input, out);
         Mockito.verify(serializer, Mockito.times(1)).serialize(input.getExperimenterDataOfChoice(), out);
index 371e83ef4d421009a21695281a9eee7c38e611e9..77ba1eddd844c37c65531ebc7afeb7cd0ff3abe0 100644 (file)
@@ -12,7 +12,7 @@ import io.netty.buffer.ByteBuf;
 import io.netty.buffer.PooledByteBufAllocator;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -45,7 +45,7 @@ public class VendorInputMessageFactoryTest {
      */
     @Test
     public void test() {
-        Mockito.when(registry.getSerializer(Matchers.<MessageTypeKey<?>>any()))
+        Mockito.when(registry.getSerializer(ArgumentMatchers.<MessageTypeKey<?>>any()))
             .thenReturn(serializer);
         VendorInputMessageFactory factory = new VendorInputMessageFactory();
         factory.injectSerializerRegistry(registry);
@@ -58,7 +58,8 @@ public class VendorInputMessageFactoryTest {
         builder.setExperimenterDataOfChoice(vendorData);
         ExperimenterInput experimenterInput = builder.build();
 
-        Mockito.when(registry.getSerializer(Matchers.<ExperimenterIdSerializerKey<ExperimenterDataOfChoice>>any()))
+        Mockito.when(registry.getSerializer(
+                ArgumentMatchers.<ExperimenterIdSerializerKey<ExperimenterDataOfChoice>>any()))
                 .thenReturn(foundSerializer);
         factory.serialize(experimenterInput, buffer);
         Mockito.verify(foundSerializer, Mockito.times(1))
index ea90453aa5da90f3eebbe1bcd254c72e482daa28..8f619556f6f66b3db852d2ee7d33a9b8468d9592 100644 (file)
@@ -13,7 +13,7 @@ import io.netty.buffer.UnpooledByteBufAllocator;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -51,7 +51,8 @@ public class MultipartRequestExperimenterTest {
     @Test
     public void testExperimenter() throws Exception {
         Mockito.when(mockRegistry.getSerializer(
-                Matchers.<ExperimenterIdTypeSerializerKey<ExperimenterDataOfChoice>>any())).thenReturn(serializer);
+                ArgumentMatchers.<ExperimenterIdTypeSerializerKey<ExperimenterDataOfChoice>>any()))
+                .thenReturn(serializer);
         MultipartRequestInputFactory multipartFactory = new MultipartRequestInputFactory();
         multipartFactory.injectSerializerRegistry(mockRegistry);
         MultipartRequestInputBuilder builder = new MultipartRequestInputBuilder();
index c7fa7e02004b130dcc422181377b588b9dfdbfee..9b473765fdc748cc9f585e00a02f7eebc3538a46 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.openflowjava.protocol.impl.serialization.factories.multipart;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.UnpooledByteBufAllocator;
 import java.math.BigInteger;
@@ -16,7 +18,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -94,7 +95,7 @@ public class MultipartRequestTableFeaturesTest {
      */
     @Before
     public void startUp() {
-        Mockito.when(mockRegistry.getSerializer((MessageTypeKey<?>)Matchers.any())).thenReturn(serializer);
+        Mockito.when(mockRegistry.getSerializer((MessageTypeKey<?>)any())).thenReturn(serializer);
         registry = new SerializerRegistryImpl();
         registry.init();
         multipartFactory = registry.getSerializer(
@@ -463,7 +464,7 @@ public class MultipartRequestTableFeaturesTest {
                 new byte[] {0x00, 0x07, 0x01, 0x05, 0x01, 0x00, 0x03, 0x01}, metadataWrite);
         Assert.assertEquals("Wrong config", 8, out.readUnsignedInt());
         Assert.assertEquals("Wrong max-entries", 65, out.readUnsignedInt());
-        Mockito.verify(serializer, Mockito.times(2)).serialize(Matchers.any(TableFeatureProperties.class),
-                Matchers.any(ByteBuf.class));
+        Mockito.verify(serializer, Mockito.times(2)).serialize(any(TableFeatureProperties.class),
+                any(ByteBuf.class));
     }
 }
index c22ab9a066ed20334a957f99df5375890855ed73..39baaf8bd1d5acf3c281edaa8cd5f94fad5c27cf 100644 (file)
@@ -13,7 +13,7 @@ import io.netty.buffer.UnpooledByteBufAllocator;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -51,7 +51,8 @@ public class OF10StatsRequestExperimenterTest {
     @Test
     public void testExperimenter() throws Exception {
         Mockito.when(mockRegistry.getSerializer(
-                Matchers.<ExperimenterIdTypeSerializerKey<ExperimenterDataOfChoice>>any())).thenReturn(serializer);
+                ArgumentMatchers.<ExperimenterIdTypeSerializerKey<ExperimenterDataOfChoice>>any()))
+                .thenReturn(serializer);
         OF10StatsRequestInputFactory multipartFactory = new OF10StatsRequestInputFactory();
         multipartFactory.injectSerializerRegistry(mockRegistry);
         MultipartRequestInputBuilder builder = new MultipartRequestInputBuilder();
index 933d92c08015b71889918819cc23b63df9191676..944d037ba6b44eea09b67b8bccabba8cbc78e2f3 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 3425dcaf34f22bea1d1bb92738397fac468fb432..1b50c63d44b8fc3a4535107e356c3ee4cf4cd6e0 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 8dd1c6da8d90219ba684c8f8502b7c424b309149..7a6a8c5d2ee4d8e68a7e3cea88e8c2af69d642f1 100644 (file)
@@ -3,8 +3,7 @@
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v1.0 which accompanies this distribution,
     and is available at http://www.eclipse.org/legal/epl-v10.html -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
index 259291b68c0d424ff99833f45fa7884ec9b1d00b..d0713b7a747e84c5e3a4ddba16082a873612079d 100644 (file)
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 66335446464118fd5ec698231fab9a1d66540da3..76fa839584ab15e4ea640d906e2e4674bd31f688 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
index 4afa8604e12938b936fa395061cc294a3e67cf2c..6e6fac1a11f537583243a13b3177e87a264a35f4 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
@@ -57,4 +56,3 @@
     </plugins>
   </build>
 </project>
-
index fc2ee773c93cc8bf9c118e79fae56f54ef981bb0..96b0aa0dd1377ce595a00ffca94425451ac01165 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
@@ -63,8 +62,8 @@
             <version>${infrautils.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.cdi</groupId>
-            <artifactId>pax-cdi-api</artifactId>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>blueprint-maven-plugin-annotation</artifactId>
             <optional>true</optional>
         </dependency>
         <dependency>
         </plugins>
     </build>
 </project>
-
index 00448e8ac440748917dfbcbfd8c4668afe73f11e..ff33309b2ad9568a09dbf9ef3a02c58dd2ba9cf8 100644 (file)
@@ -31,7 +31,6 @@ import org.opendaylight.openflowplugin.impl.util.FlowCreatorUtil;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowOutput;
@@ -207,7 +206,7 @@ public class SalFlowServiceImpl implements SalFlowService {
                 final FlowDescriptor flowDescriptor;
 
                 if (Objects.nonNull(input.getFlowRef())) {
-                    final FlowId flowId = input.getFlowRef().getValue().firstKeyOf(Flow.class, FlowKey.class).getId();
+                    final FlowId flowId = input.getFlowRef().getValue().firstKeyOf(Flow.class).getId();
                     flowDescriptor = FlowDescriptorFactory.create(input.getTableId(), flowId);
                     deviceContext.getDeviceFlowRegistry().storeDescriptor(flowRegistryKey, flowDescriptor);
                 } else {
index 30a9ee965aa25ab6d77adb6c82214b169bf826d9..0c967c87f4281579181139f190f1ac68bc911779 100644 (file)
@@ -26,7 +26,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
+
+import org.opendaylight.mdsal.binding.api.TransactionChainClosedException;
 import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
 import org.opendaylight.openflowplugin.api.ConnectionException;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
index c7f8e4052e31d01f0a7ce044032d5474a572a4f1..cfc4f16ae942c830e3676695d0d27b4087780204 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -104,12 +104,6 @@ public class OpenFlowPluginProviderImplTest {
                 .thenReturn(THREAD_POOL_MAX_THREADS);
         when(configurationService.getProperty(eq(ConfigurationProperty.THREAD_POOL_TIMEOUT.toString()), any()))
                 .thenReturn(THREAD_POOL_TIMEOUT);
-        when(configurationService.getProperty(eq(ConfigurationProperty.RPC_REQUESTS_QUOTA.toString()), any()))
-                .thenReturn(RPC_REQUESTS_QUOTA);
-        when(configurationService.getProperty(eq(ConfigurationProperty.GLOBAL_NOTIFICATION_QUOTA.toString()), any()))
-                .thenReturn(GLOBAL_NOTIFICATION_QUOTA);
-        when(configurationService.getProperty(eq(ConfigurationProperty.BASIC_TIMER_DELAY.toString()), any()))
-                .thenReturn(BASIC_TIMER_DELAY);
         when(configurationService.getProperty(eq(ConfigurationProperty.DEVICE_CONNECTION_RATE_LIMIT_PER_MIN.toString()),
                 any())).thenReturn(DEVICE_CONNECTION_RATE_LIMIT_PER_MIN);
     }
index 252380350684893e2c341d6a341a3c9e10229fd4..a9685b24fdf5bee3cebc7fdb934d50f8eca6c3d3 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.impl.configuration;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
index 55af2a5f47556bab288e19f8f22ff63684709836..ea153bddeb202cec31e57ba77ce01b08cc29dabf 100644 (file)
@@ -8,8 +8,8 @@
 package org.opendaylight.openflowplugin.impl.configuration;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
 
 import org.junit.After;
index ce26880054237e06faff7bb355dcf47ae872b0a5..0aaeefe9ed1aed991114e2b15b5f8eb196d097c2 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.openflowplugin.impl.connection;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.util.concurrent.SettableFuture;
 import java.math.BigInteger;
 import java.net.InetSocketAddress;
@@ -17,8 +19,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -79,7 +81,7 @@ public class ConnectionManagerImplTest {
         final InetSocketAddress deviceAddress = InetSocketAddress.createUnresolved("yahoo", 42);
         Mockito.when(connection.getRemoteAddress()).thenReturn(deviceAddress);
         Mockito.when(connection.isAlive()).thenReturn(true);
-        Mockito.when(connection.barrier(Matchers.<BarrierInput>any()))
+        Mockito.when(connection.barrier(ArgumentMatchers.<BarrierInput>any()))
                 .thenReturn(RpcResultBuilder.success(new BarrierOutputBuilder().build()).buildFuture());
     }
 
@@ -110,11 +112,11 @@ public class ConnectionManagerImplTest {
 
         // prepare void reply (hello rpc output)
         final SettableFuture<RpcResult<HelloOutput>> voidResponseFx = SettableFuture.create();
-        Mockito.when(connection.hello(Matchers.any(HelloInput.class))).thenReturn(voidResponseFx);
+        Mockito.when(connection.hello(any(HelloInput.class))).thenReturn(voidResponseFx);
         // prepare getFeature reply (getFeture rpc output)
         final SettableFuture<RpcResult<GetFeaturesOutput>> featureResponseFx =
                 SettableFuture.<RpcResult<GetFeaturesOutput>>create();
-        Mockito.when(connection.getFeatures(Matchers.any(GetFeaturesInput.class))).thenReturn(featureResponseFx);
+        Mockito.when(connection.getFeatures(any(GetFeaturesInput.class))).thenReturn(featureResponseFx);
 
 
         // fire handshake
@@ -141,7 +143,7 @@ public class ConnectionManagerImplTest {
         featureResponseFx.set(rpcFeaturesOutput);
 
         Mockito.verify(deviceConnectedHandler,
-                Mockito.timeout(500)).deviceConnected(Matchers.any(ConnectionContext.class));
+                Mockito.timeout(500)).deviceConnected(any(ConnectionContext.class));
     }
 
     /**
@@ -166,11 +168,11 @@ public class ConnectionManagerImplTest {
 
         // prepare void reply (hello rpc output)
         final SettableFuture<RpcResult<HelloOutput>> voidResponseFx = SettableFuture.create();
-        Mockito.when(connection.hello(Matchers.any(HelloInput.class))).thenReturn(voidResponseFx);
+        Mockito.when(connection.hello(any(HelloInput.class))).thenReturn(voidResponseFx);
         // prepare getFeature reply (getFeture rpc output)
         final SettableFuture<RpcResult<GetFeaturesOutput>> featureResponseFx =
                 SettableFuture.<RpcResult<GetFeaturesOutput>>create();
-        Mockito.when(connection.getFeatures(Matchers.any(GetFeaturesInput.class))).thenReturn(featureResponseFx);
+        Mockito.when(connection.getFeatures(any(GetFeaturesInput.class))).thenReturn(featureResponseFx);
 
 
         // fire handshake - send hello reply
@@ -197,6 +199,6 @@ public class ConnectionManagerImplTest {
         featureResponseFx.set(rpcFeaturesOutput);
 
         Mockito.verify(deviceConnectedHandler,
-                Mockito.timeout(FINAL_STEP_TIMEOUT)).deviceConnected(Matchers.any(ConnectionContext.class));
+                Mockito.timeout(FINAL_STEP_TIMEOUT)).deviceConnected(any(ConnectionContext.class));
     }
 }
index 8f896331568a6bcaf7694f8d4b71f946ae1c4b9e..e4746f70486f175cdf3875b913bb57594f983257 100644 (file)
@@ -7,6 +7,9 @@
  */
 package org.opendaylight.openflowplugin.impl.connection;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyShort;
+
 import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.Futures;
 import java.util.ArrayList;
@@ -17,7 +20,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -79,7 +81,7 @@ public class HandshakeManagerImplTest {
 
         resultFeatures = RpcResultBuilder.success(new GetFeaturesOutputBuilder().build()).build();
 
-        Mockito.when(adapter.hello(Matchers.any(HelloInput.class)))
+        Mockito.when(adapter.hello(any(HelloInput.class)))
                 .thenReturn(Futures.immediateFuture(RpcResultBuilder.success((HelloOutput) null).build()));
     }
 
@@ -95,7 +97,7 @@ public class HandshakeManagerImplTest {
             LOG.warn(problem.getMessage(), problem);
         }
 
-        Mockito.verify(errorHandler, Mockito.times(expectedErrors)).handleException(Matchers.any(Throwable.class));
+        Mockito.verify(errorHandler, Mockito.times(expectedErrors)).handleException(any(Throwable.class));
     }
 
     /**
@@ -153,7 +155,7 @@ public class HandshakeManagerImplTest {
         LOG.debug("testVersionNegotiation10");
         Short version = OFConstants.OFP_VERSION_1_0;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(null);
@@ -172,7 +174,7 @@ public class HandshakeManagerImplTest {
         LOG.debug("testVersionNegotiation10-ss");
         Short version = OFConstants.OFP_VERSION_1_0;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
@@ -193,7 +195,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
     /**
@@ -211,7 +213,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
     /**
@@ -224,7 +226,7 @@ public class HandshakeManagerImplTest {
         Short version = (short) 0x02;
         Short expVersion = (short) 0x01;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
@@ -243,7 +245,7 @@ public class HandshakeManagerImplTest {
         final Short version = (short) 0x02;
         final Short expVersion = (short) 0x01;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(null);
@@ -264,7 +266,7 @@ public class HandshakeManagerImplTest {
         LOG.debug("testVersionNegotiation13");
         Short version = OFConstants.OFP_VERSION_1_3;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
@@ -281,7 +283,7 @@ public class HandshakeManagerImplTest {
         LOG.debug("testVersionNegotiation13-ss");
         Short version = OFConstants.OFP_VERSION_1_3;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(null);
@@ -301,7 +303,7 @@ public class HandshakeManagerImplTest {
         Short version = (short) 0x06;
         Short expVersion = OFConstants.OFP_VERSION_1_3;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
@@ -321,7 +323,7 @@ public class HandshakeManagerImplTest {
         Short version = (short) 0x06;
         Short expVersion = OFConstants.OFP_VERSION_1_3;
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
@@ -346,7 +348,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
     /**
@@ -366,7 +368,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(createHelloMessage(version, helloXid).build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
     /**
@@ -382,7 +384,7 @@ public class HandshakeManagerImplTest {
         HelloMessageBuilder helloMessage = createHelloMessage(version, helloXid);
         addVersionBitmap(Lists.newArrayList((short) 0x05, OFConstants.OFP_VERSION_1_0), helloMessage);
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(helloMessage.build());
@@ -403,7 +405,7 @@ public class HandshakeManagerImplTest {
         HelloMessageBuilder helloMessage = createHelloMessage(version, helloXid);
         addVersionBitmap(Lists.newArrayList((short) 0x05, OFConstants.OFP_VERSION_1_0), helloMessage);
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(null);
@@ -426,7 +428,7 @@ public class HandshakeManagerImplTest {
         HelloMessageBuilder helloMessage = createHelloMessage(version, helloXid);
         addVersionBitmap(Lists.newArrayList((short) 0x05, OFConstants.OFP_VERSION_1_3), helloMessage);
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(helloMessage.build());
@@ -447,7 +449,7 @@ public class HandshakeManagerImplTest {
         HelloMessageBuilder helloMessage = createHelloMessage(version, helloXid);
         addVersionBitmap(Lists.newArrayList((short) 0x05, OFConstants.OFP_VERSION_1_3), helloMessage);
 
-        Mockito.when(adapter.getFeatures(Matchers.any(GetFeaturesInput.class)))
+        Mockito.when(adapter.getFeatures(any(GetFeaturesInput.class)))
                 .thenReturn(Futures.immediateFuture(resultFeatures));
 
         handshakeManager.shake(null);
@@ -474,7 +476,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(helloMessage.build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
     /**
@@ -496,7 +498,7 @@ public class HandshakeManagerImplTest {
         handshakeManager.shake(helloMessage.build());
 
         Mockito.verify(handshakeListener, Mockito.never())
-                .onHandshakeSuccessful(Matchers.any(GetFeaturesOutput.class), Matchers.anyShort());
+                .onHandshakeSuccessful(any(GetFeaturesOutput.class), anyShort());
     }
 
 
index 5e75c48aba730ee4786bd70798b6136671da0779..417c878210eb64e45362186ac8ce030e38b6b5f2 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.connection.listener;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import java.math.BigInteger;
 import java.net.InetSocketAddress;
 import org.junit.After;
@@ -16,8 +18,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -56,7 +58,7 @@ public class HandshakeListenerImplTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(connectionAdapter.barrier(Matchers.<BarrierInput>any()))
+        Mockito.when(connectionAdapter.barrier(ArgumentMatchers.<BarrierInput>any()))
                 .thenReturn(RpcResultBuilder.success(new BarrierOutputBuilder().build()).buildFuture());
         connectionContextSpy = Mockito.spy(new ConnectionContextImpl(connectionAdapter));
         Mockito.when(connectionContextSpy.getConnectionAdapter()).thenReturn(connectionAdapter);
@@ -74,7 +76,7 @@ public class HandshakeListenerImplTest {
     public void testOnHandshakeSuccessfull() throws Exception {
         handshakeListener.onHandshakeSuccessful(features, OFConstants.OFP_VERSION_1_3);
         Mockito.verify(connectionContextSpy).changeStateToWorking();
-        Mockito.verify(connectionContextSpy).setFeatures(Matchers.any(FeaturesReply.class));
+        Mockito.verify(connectionContextSpy).setFeatures(any(FeaturesReply.class));
         Mockito.verify(connectionContextSpy).setNodeId(nodeIdCaptor.capture());
         Mockito.verify(connectionContextSpy).handshakeSuccessful();
         Mockito.verify(deviceConnectedHandler).deviceConnected(connectionContextSpy);
index 00ab46a2ca5937c301cdd1d771d834bb758894d4..e5c07b89e37ba4cac65799d19e7b409581115a39 100644 (file)
@@ -12,7 +12,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -61,7 +61,7 @@ public class OpenflowProtocolListenerInitialImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3);
         openflowProtocolListenerInitial.onEchoRequestMessage(echoRequestMessageBld.build());
 
-        Mockito.verify(connectionAdapter).echoReply(Matchers.<EchoReplyInput>any());
+        Mockito.verify(connectionAdapter).echoReply(ArgumentMatchers.<EchoReplyInput>any());
     }
 
     @Test
@@ -71,7 +71,7 @@ public class OpenflowProtocolListenerInitialImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3);
         openflowProtocolListenerInitial.onHelloMessage(helloMessageBld.build());
 
-        Mockito.verify(handshakeManager).shake(Matchers.<HelloMessage>any());
+        Mockito.verify(handshakeManager).shake(ArgumentMatchers.<HelloMessage>any());
     }
 
     @Test
index 62eb39a37017d461764fa25f561977861bb0f760..2abf175a02beb836ef7c27001739294d09b07012 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.connection.listener;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.SettableFuture;
@@ -18,10 +20,9 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
 import org.opendaylight.openflowplugin.impl.connection.ConnectionContextImpl;
@@ -92,8 +93,6 @@ public class SystemNotificationsListenerImplTest {
      */
     @Test
     public void testOnDisconnectEvent1() throws Exception {
-        Mockito.when(connectionAdapter.isAlive()).thenReturn(true);
-        Mockito.when(connectionAdapter.disconnect()).thenReturn(Futures.immediateFuture(Boolean.TRUE));
 
         DisconnectEvent disconnectNotification = new DisconnectEventBuilder().setInfo("testing disconnect").build();
         systemNotificationsListener.onDisconnectEvent(disconnectNotification);
@@ -109,8 +108,6 @@ public class SystemNotificationsListenerImplTest {
      */
     @Test
     public void testOnDisconnectEvent2() throws Exception {
-        Mockito.when(connectionAdapter.isAlive()).thenReturn(true);
-        Mockito.when(connectionAdapter.disconnect()).thenReturn(Futures.immediateFuture(Boolean.FALSE));
 
         DisconnectEvent disconnectNotification = new DisconnectEventBuilder().setInfo("testing disconnect").build();
         systemNotificationsListener.onDisconnectEvent(disconnectNotification);
@@ -128,10 +125,6 @@ public class SystemNotificationsListenerImplTest {
     public void testOnDisconnectEvent3() throws Exception {
         connectionContextGolem.changeStateToTimeouting();
 
-        Mockito.when(connectionAdapter.isAlive()).thenReturn(true);
-        Mockito.when(connectionAdapter.disconnect())
-                .thenReturn(Futures.<Boolean>immediateFailedFuture(new Exception("unit exception")));
-
         DisconnectEvent disconnectNotification = new DisconnectEventBuilder().setInfo("testing disconnect").build();
         systemNotificationsListener.onDisconnectEvent(disconnectNotification);
 
@@ -147,7 +140,6 @@ public class SystemNotificationsListenerImplTest {
     @Test
     public void testOnDisconnectEvent4() throws Exception {
         Mockito.when(connectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.RIP);
-        Mockito.when(connectionAdapter.isAlive()).thenReturn(false);
 
         DisconnectEvent disconnectNotification = new DisconnectEventBuilder().setInfo("testing disconnect").build();
         systemNotificationsListener.onDisconnectEvent(disconnectNotification);
@@ -166,7 +158,7 @@ public class SystemNotificationsListenerImplTest {
         final ListenableFuture<RpcResult<EchoOutput>> echoReply =
                 Futures.immediateFuture(RpcResultBuilder.success(new EchoOutputBuilder().setXid(0L).build()).build());
 
-        Mockito.when(connectionAdapter.echo(Matchers.any(EchoInput.class))).thenReturn(echoReply);
+        Mockito.when(connectionAdapter.echo(any(EchoInput.class))).thenReturn(echoReply);
 
         SwitchIdleEvent notification = new SwitchIdleEventBuilder().setInfo("wake up, device sleeps").build();
         systemNotificationsListener.onSwitchIdleEvent(notification);
@@ -175,7 +167,7 @@ public class SystemNotificationsListenerImplTest {
         Thread.sleep(SAFE_TIMEOUT);
 
         verifyCommonInvocations();
-        Mockito.verify(connectionAdapter, Mockito.timeout(SAFE_TIMEOUT)).echo(Matchers.any(EchoInput.class));
+        Mockito.verify(connectionAdapter, Mockito.timeout(SAFE_TIMEOUT)).echo(any(EchoInput.class));
         Mockito.verify(connectionAdapter, Mockito.never()).disconnect();
         Mockito.verify(connectionContext).changeStateToTimeouting();
         Mockito.verify(connectionContext).changeStateToWorking();
@@ -187,7 +179,7 @@ public class SystemNotificationsListenerImplTest {
     @Test
     public void testOnSwitchIdleEvent2() throws Exception {
         final SettableFuture<RpcResult<EchoOutput>> echoReply = SettableFuture.create();
-        Mockito.when(connectionAdapter.echo(Matchers.any(EchoInput.class))).thenReturn(echoReply);
+        Mockito.when(connectionAdapter.echo(any(EchoInput.class))).thenReturn(echoReply);
         Mockito.when(connectionAdapter.isAlive()).thenReturn(true);
         Mockito.when(connectionAdapter.disconnect())
                 .thenReturn(Futures.<Boolean>immediateFailedFuture(new Exception("unit exception")));
@@ -198,7 +190,7 @@ public class SystemNotificationsListenerImplTest {
         Thread.sleep(SystemNotificationsListenerImpl.MAX_ECHO_REPLY_TIMEOUT + SAFE_TIMEOUT);
 
         verifyCommonInvocations();
-        Mockito.verify(connectionAdapter, Mockito.timeout(SAFE_TIMEOUT)).echo(Matchers.any(EchoInput.class));
+        Mockito.verify(connectionAdapter, Mockito.timeout(SAFE_TIMEOUT)).echo(any(EchoInput.class));
         Mockito.verify(connectionAdapter).disconnect();
         Mockito.verify(connectionContext).changeStateToTimeouting();
         Mockito.verify(connectionContext).closeConnection(true);
index 6df3c52622c8989ed606254bd8d8b36e704eefb1..5424dce47e4091c391c501462bef226312e92c3b 100644 (file)
@@ -11,9 +11,10 @@ package org.opendaylight.openflowplugin.impl.device;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -183,38 +184,39 @@ public class DeviceContextImplTest {
     public void setUp() throws Exception {
         final CheckedFuture<Optional<Node>, ReadFailedException> noExistNodeFuture =
                 Futures.immediateCheckedFuture(Optional.<Node>absent());
-        Mockito.when(readTx.read(LogicalDatastoreType.OPERATIONAL, nodeKeyIdent)).thenReturn(noExistNodeFuture);
+        Mockito.lenient().when(readTx.read(LogicalDatastoreType.OPERATIONAL, nodeKeyIdent))
+                .thenReturn(noExistNodeFuture);
         Mockito.when(dataBroker.newReadOnlyTransaction()).thenReturn(readTx);
-        Mockito.when(dataBroker.createTransactionChain(Mockito.any(TransactionChainManager.class)))
+        Mockito.when(dataBroker.createTransactionChain(any(TransactionChainManager.class)))
                 .thenReturn(txChainFactory);
         Mockito.when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeKeyIdent);
         Mockito.when(deviceInfo.getNodeId()).thenReturn(nodeId);
         Mockito.when(deviceInfo.getDatapathId()).thenReturn(BigInteger.ONE);
         final SettableFuture<RpcResult<GetAsyncReply>> settableFuture = SettableFuture.create();
         final SettableFuture<RpcResult<MultipartReply>> settableFutureMultiReply = SettableFuture.create();
-        Mockito.when(requestContext.getFuture()).thenReturn(settableFuture);
-        Mockito.doAnswer(invocation -> {
+        Mockito.lenient().when(requestContext.getFuture()).thenReturn(settableFuture);
+        Mockito.lenient().doAnswer(invocation -> {
             settableFuture.set((RpcResult<GetAsyncReply>) invocation.getArguments()[0]);
             return null;
-        }).when(requestContext).setResult(any(RpcResult.class));
+        }).when(requestContext).setResult(Mockito.<RpcResult>any());
 
-        Mockito.when(requestContextMultiReply.getFuture()).thenReturn(settableFutureMultiReply);
-        Mockito.doAnswer(invocation -> {
+        Mockito.lenient().when(requestContextMultiReply.getFuture()).thenReturn(settableFutureMultiReply);
+        Mockito.lenient().doAnswer(invocation -> {
             settableFutureMultiReply.set((RpcResult<MultipartReply>) invocation.getArguments()[0]);
             return null;
         }).when(requestContextMultiReply).setResult(any(RpcResult.class));
         Mockito.when(txChainFactory.newReadWriteTransaction()).thenReturn(writeTx);
         Mockito.when(dataBroker.newReadOnlyTransaction()).thenReturn(readTx);
-        Mockito.when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
+        Mockito.lenient().when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
         Mockito.when(connectionContext.getConnectionAdapter()).thenReturn(connectionAdapter);
         Mockito.when(connectionContext.getDeviceInfo()).thenReturn(deviceInfo);
         final FeaturesReply mockedFeaturesReply = mock(FeaturesReply.class);
-        when(connectionContext.getFeatures()).thenReturn(mockedFeaturesReply);
-        when(connectionContext.getFeatures().getCapabilities()).thenReturn(mock(Capabilities.class));
+        lenient().when(connectionContext.getFeatures()).thenReturn(mockedFeaturesReply);
+        lenient().when(connectionContext.getFeatures().getCapabilities()).thenReturn(mock(Capabilities.class));
 
-        Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
-        Mockito.when(featuresOutput.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
-        Mockito.when(featuresOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(featuresOutput.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
+        Mockito.lenient().when(featuresOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
         Mockito.when(contextChainHolder.getContextChain(deviceInfo)).thenReturn(contextChain);
         Mockito.when(contextChain.isMastered(ContextChainMastershipState.CHECK, false)).thenReturn(true);
 
@@ -225,10 +227,11 @@ public class DeviceContextImplTest {
                         .build())
                 .build();
 
-        Mockito.when(messageTranslatorPacketReceived.translate(any(Object.class), any(DeviceInfo.class),
-                any(Object.class))).thenReturn(packetReceived);
-        Mockito.when(messageTranslatorFlowCapableNodeConnector.translate(any(Object.class), any(DeviceInfo.class),
-                any(Object.class))).thenReturn(mock(FlowCapableNodeConnector.class));
+        Mockito.when(messageTranslatorPacketReceived.translate(Mockito.<Object>any(), Mockito.<DeviceInfo>any(),
+                Mockito.<Object>any())).thenReturn(packetReceived);
+        Mockito.when(messageTranslatorFlowCapableNodeConnector.translate(Mockito.<Object>any(),
+                Mockito.<DeviceInfo>any(),
+                Mockito.<Object>any())).thenReturn(mock(FlowCapableNodeConnector.class));
         Mockito.when(translatorLibrary.lookupTranslator(eq(new TranslatorKey(OFConstants.OFP_VERSION_1_3,
                 PacketIn.class.getName())))).thenReturn(messageTranslatorPacketReceived);
         Mockito.when(translatorLibrary.lookupTranslator(eq(new TranslatorKey(OFConstants.OFP_VERSION_1_3,
@@ -242,8 +245,9 @@ public class DeviceContextImplTest {
         final java.util.Optional<AbstractDeviceInitializer> deviceInitializer = java.util.Optional
                 .of(this.abstractDeviceInitializer);
 
-        Mockito.when(deviceInitializerProvider.lookup(OFConstants.OFP_VERSION_1_3)).thenReturn(deviceInitializer);
-        Mockito.when(salRoleService.setRole(any())).thenReturn(Futures.immediateFuture(null));
+        Mockito.lenient().when(deviceInitializerProvider.lookup(OFConstants.OFP_VERSION_1_3))
+                .thenReturn(deviceInitializer);
+        Mockito.lenient().when(salRoleService.setRole(any())).thenReturn(Futures.immediateFuture(null));
 
         deviceContext = new DeviceContextImpl(
                 connectionContext,
@@ -336,10 +340,12 @@ public class DeviceContextImplTest {
     public void testProcessReply() {
         final Error mockedError = mock(Error.class);
         deviceContext.processReply(mockedError);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
+                eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
         final OfHeader mockedOfHeader = mock(OfHeader.class);
         deviceContext.processReply(mockedOfHeader);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
+                eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -348,11 +354,13 @@ public class DeviceContextImplTest {
 
         final Error mockedError = mock(Error.class);
         deviceContext.processReply(dummyXid, Lists.newArrayList(mockedError));
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
+                eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
 
         final MultipartReply mockedMultipartReply = mock(MultipartReply.class);
         deviceContext.processReply(dummyXid, Lists.newArrayList(mockedMultipartReply));
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
+                eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -365,8 +373,9 @@ public class DeviceContextImplTest {
                 .thenReturn(stringListenableFuture);
         deviceContext.setNotificationPublishService(mockedNotificationPublishService);
         deviceContext.processPacketInMessage(mockedPacketInMessage);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH));
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(), eq(MessageSpy.StatisticsGroup.FROM_SWITCH));
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
+                eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -375,10 +384,10 @@ public class DeviceContextImplTest {
         final NotificationPublishService mockedNotificationPublishService = mock(NotificationPublishService.class);
         final ListenableFuture dummyFuture = Futures.immediateFailedFuture(new IllegalStateException());
 
-        when(mockedNotificationPublishService.offerNotification(any(PacketReceived.class))).thenReturn(dummyFuture);
+        when(mockedNotificationPublishService.offerNotification(Mockito.<PacketReceived>any())).thenReturn(dummyFuture);
         deviceContext.setNotificationPublishService(mockedNotificationPublishService);
         deviceContext.processPacketInMessage(mockedPacketInMessage);
-        verify(messageSpy).spyMessage(any(Class.class),
+        verify(messageSpy).spyMessage(Mockito.<Class>any(),
                 eq(MessageSpy.StatisticsGroup.FROM_SWITCH_NOTIFICATION_REJECTED));
     }
 
@@ -411,9 +420,9 @@ public class DeviceContextImplTest {
 
 
         final GetFeaturesOutput mockedFeature = mock(GetFeaturesOutput.class);
-        when(mockedFeature.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
+        lenient().when(mockedFeature.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
 
-        when(mockedPortStatusMessage.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        lenient().when(mockedPortStatusMessage.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
         when(mockedPortStatusMessage.getReason()).thenReturn(PortReason.OFPPRADD);
         when(mockedPortStatusMessage.getPortNo()).thenReturn(42L);
 
@@ -431,7 +440,7 @@ public class DeviceContextImplTest {
                 .setMatch(new MatchBuilder().build());
         final NotificationPublishService mockedNotificationPublishService = mock(NotificationPublishService.class);
 
-        Mockito.when(messageTranslatorFlowRemoved
+        Mockito.lenient().when(messageTranslatorFlowRemoved
                 .translate(any(Object.class), any(DeviceInfo.class), any(Object.class)))
                 .thenReturn(flowRemovedMdsalBld.build());
 
index dd106cbb330e8031cdf9631334d3b60453f8d282..2a0a6f3ce31a99477a9a5683c3e8b5e6fbebaedd 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.impl.device;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -21,7 +21,6 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import io.netty.util.HashedWheelTimer;
 import java.lang.reflect.Field;
-import java.math.BigInteger;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import org.junit.Assert;
@@ -36,7 +35,6 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
@@ -106,22 +104,14 @@ public class DeviceManagerImplTest {
 
     @Before
     public void setUp() throws Exception {
-        when(mockConnectionContext.getNodeId()).thenReturn(DUMMY_NODE_ID);
         when(mockConnectionContext.getFeatures()).thenReturn(mockFeatures);
         when(mockConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
         when(mockConnectionContext.getDeviceInfo()).thenReturn(deviceInfo);
-        when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockConnectionContext);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(DUMMY_IDENTIFIER);
         when(deviceInfo.getNodeId()).thenReturn(DUMMY_NODE_ID);
 
-        when(mockFeatures.getCapabilities()).thenReturn(capabilities);
-        when(mockFeatures.getCapabilitiesV10()).thenReturn(capabilitiesV10);
-        when(mockFeatures.getDatapathId()).thenReturn(BigInteger.valueOf(21L));
-
         when(mockedFuture.isDone()).thenReturn(true);
         when(writeTransaction.submit()).thenReturn(mockedFuture);
-        when(transactionChain.newWriteOnlyTransaction()).thenReturn(writeTransaction);
-        when(dataBroker.createTransactionChain(any(TransactionChainListener.class))).thenReturn(transactionChain);
         when(dataBroker.newWriteOnlyTransaction()).thenReturn(writeTransaction);
 
         deviceManager = new DeviceManagerImpl(
index 191745c09fa7404f2a9f5264616161b2b728cd74..fb546dfc7f6037578e367b94d2862ef31a848ba2 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.device;
 
+import static org.mockito.ArgumentMatchers.anyBoolean;
+
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -91,7 +92,7 @@ public class PacketInRateLimiterTest {
         Assert.assertEquals(6, rateLimiter.getOccupiedPermits());
         Assert.assertFalse(rateLimiter.isLimited());
 
-        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(Matchers.anyBoolean());
+        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(anyBoolean());
     }
 
     private void acquirePermits(int permits) {
@@ -136,7 +137,7 @@ public class PacketInRateLimiterTest {
         Assert.assertFalse(rateLimiter.isLimited());
         caOrdered.verify(connectionAdapter).setPacketInFiltering(false);
 
-        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(Matchers.anyBoolean());
+        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(anyBoolean());
     }
 
     @Test
@@ -163,7 +164,7 @@ public class PacketInRateLimiterTest {
         Assert.assertFalse(rateLimiter.isLimited());
         caOrdered.verify(connectionAdapter).setPacketInFiltering(false);
 
-        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(Matchers.anyBoolean());
+        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(anyBoolean());
     }
 
     @Test
@@ -195,6 +196,6 @@ public class PacketInRateLimiterTest {
         Assert.assertEquals(12, rateLimiter.getOccupiedPermits());
         Assert.assertFalse(rateLimiter.isLimited());
 
-        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(Matchers.anyBoolean());
+        Mockito.verify(connectionAdapter, Mockito.times(2)).setPacketInFiltering(anyBoolean());
     }
 }
\ No newline at end of file
index c2b7cfcb36a1cce501d0f3b256ed5c27431f5891..16cf635ba1900bf27b98afcf300dd1d7fbe23257 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.device;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Futures;
@@ -15,7 +17,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -66,14 +67,10 @@ public class TransactionChainManagerTest {
         final ReadOnlyTransaction readOnlyTx = Mockito.mock(ReadOnlyTransaction.class);
         final CheckedFuture<Optional<Node>, ReadFailedException> noExistNodeFuture = Futures
                 .immediateCheckedFuture(Optional.<Node>absent());
-        Mockito.when(readOnlyTx.read(LogicalDatastoreType.OPERATIONAL, nodeKeyIdent)).thenReturn(noExistNodeFuture);
-        Mockito.when(dataBroker.newReadOnlyTransaction()).thenReturn(readOnlyTx);
-        Mockito.when(dataBroker.createTransactionChain(Matchers.any(TransactionChainListener.class)))
+        Mockito.when(dataBroker.createTransactionChain(any(TransactionChainListener.class)))
                 .thenReturn(txChain);
         nodeId = new NodeId("h2g2:42");
         nodeKeyIdent = DeviceStateUtil.createNodeInstanceIdentifier(nodeId);
-        Mockito.when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeKeyIdent);
-        Mockito.when(deviceInfo.getNodeId()).thenReturn(nodeId);
         txChainManager = new TransactionChainManager(dataBroker, nodeId.getValue());
         Mockito.when(txChain.newReadWriteTransaction()).thenReturn(writeTx);
 
@@ -187,9 +184,6 @@ public class TransactionChainManagerTest {
 
     @Test
     public void testDeactivateTransactionChainManagerFailed() throws Exception {
-        Mockito.when(writeTx.submit()).thenReturn(
-                Futures.<Void, TransactionCommitFailedException>immediateFailedCheckedFuture(
-                        new TransactionCommitFailedException("mock")));
         final Node data = new NodeBuilder().setId(nodeId).build();
         txChainManager.writeToTransaction(LogicalDatastoreType.CONFIGURATION, path, data, false);
 
index 7041f3455ef323e2ccf4db3a52a41979fe75218d..c61702f5cf3b9bf5d5e27fceef6e34886c200677 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.device.initialization;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
index 52e5f697990332d39cfc56270d2d9ab8ae23ed85..d641a1f9e449925a399f11a2253e2963cf5ac61e 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.device.initialization;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -97,7 +97,6 @@ public class OF13DeviceInitializerTest {
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
         when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
-        when(translatorLibrary.lookupTranslator(any())).thenReturn(messageTranslator);
         when(deviceContext.oook()).thenReturn(translatorLibrary);
         when(requestContext.getXid()).thenReturn(new Xid(42L));
         when(deviceContext.createRequestContext()).thenReturn(requestContext);
index b54ec50a873e25b76b34cc3822109dc1b30b91dc..54b5918150ec1b236cbef7ffca6f81bf227befb4 100644 (file)
@@ -8,12 +8,14 @@
 
 package org.opendaylight.openflowplugin.impl.device.listener;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import java.net.InetSocketAddress;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -64,7 +66,7 @@ public class OpenflowProtocolListenerFullImplTest {
         connectionAdapter.setMessageListener(ofProtocolListener);
         Mockito.when(connectionAdapter.getRemoteAddress())
                 .thenReturn(InetSocketAddress.createUnresolved("ofp-junit.example.org", 6663));
-        Mockito.verify(connectionAdapter).setMessageListener(Matchers.any(OpenflowProtocolListener.class));
+        Mockito.verify(connectionAdapter).setMessageListener(any(OpenflowProtocolListener.class));
     }
 
     @After
@@ -83,7 +85,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onEchoRequestMessage(echoRequestMessage);
 
-        Mockito.verify(connectionAdapter).echoReply(Matchers.any(EchoReplyInput.class));
+        Mockito.verify(connectionAdapter).echoReply(any(EchoReplyInput.class));
     }
 
     /**
@@ -97,7 +99,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onErrorMessage(errorMessage);
 
-        Mockito.verify(deviceReplyProcessor).processReply(Matchers.any(ErrorMessage.class));
+        Mockito.verify(deviceReplyProcessor).processReply(any(ErrorMessage.class));
     }
 
     /**
@@ -111,7 +113,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onExperimenterMessage(experimenterMessage);
 
-        Mockito.verify(deviceReplyProcessor).processExperimenterMessage(Matchers.<ExperimenterMessage>any());
+        Mockito.verify(deviceReplyProcessor).processExperimenterMessage(ArgumentMatchers.<ExperimenterMessage>any());
     }
 
     /**
@@ -125,7 +127,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onFlowRemovedMessage(flowRemovedMessage);
 
-        Mockito.verify(deviceReplyProcessor).processFlowRemovedMessage(Matchers.any(FlowRemovedMessage.class));
+        Mockito.verify(deviceReplyProcessor).processFlowRemovedMessage(any(FlowRemovedMessage.class));
     }
 
     /**
@@ -154,7 +156,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onPacketInMessage(packetInMessage);
 
-        Mockito.verify(deviceReplyProcessor).processPacketInMessage(Matchers.any(PacketInMessage.class));
+        Mockito.verify(deviceReplyProcessor).processPacketInMessage(any(PacketInMessage.class));
     }
 
     /**
@@ -168,7 +170,7 @@ public class OpenflowProtocolListenerFullImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3).setXid(xid).build();
         ofProtocolListener.onPortStatusMessage(portStatusMessage);
 
-        Mockito.verify(deviceReplyProcessor).processPortStatusMessage(Matchers.any(PortStatusMessage.class));
+        Mockito.verify(deviceReplyProcessor).processPortStatusMessage(any(PortStatusMessage.class));
     }
 
 }
index 8b016e982a7272a7477c6c111bc222c34b6ba59d..50da77de1c68f54fe5101501ae6425864a3a71f1 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.anyString;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageIntelligenceAgency;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
@@ -45,7 +46,7 @@ public class ClearStatsCommandProviderTest extends AbstractKarafTest {
 
     @After
     public void tearDown() {
-        Mockito.verify(console).print(Matchers.anyString());
+        Mockito.verify(console).print(anyString());
         mi5.resetStatistics();
     }
 
index cc19551ce8ffb15a8fbdc995bfc328a92fa949b4..8e0dc77bd08601acd202016956222cc3732d9bb6 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.anyString;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
@@ -41,7 +42,7 @@ public class ResetEventTimesComandProviderTest extends AbstractKarafTest {
 
     @After
     public void tearDown() {
-        Mockito.verify(console).print(Matchers.anyString());
+        Mockito.verify(console).print(anyString());
         EventsTimeCounter.resetAllCounters();
     }
 
index bdc394449d6d5cb657fb83c97b5087ee4971465b..c09a1605a43b295f968a4246ea2392d22b0128ea 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.anyString;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
 
@@ -40,7 +41,7 @@ public class ResetSessionStatsComandProviderTest extends AbstractKarafTest {
 
     @After
     public void tearDown() {
-        Mockito.verify(console).print(Matchers.anyString());
+        Mockito.verify(console).print(anyString());
         SessionStatistics.resetAllCounters();
     }
 
index 65fe3cfc204d7afe5a82e85bc5be7613eccc3822..f8f4804893bc24f7ff6984a86ae70becaf7319f9 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.contains;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
@@ -69,6 +70,6 @@ public class ShowEventTimesComandProviderTest extends AbstractKarafTest {
 
         showEventTimesComandProvider.execute(cmdSession);
         Assert.assertFalse(checkNoActivity(EventsTimeCounter.provideTimes(), CHECK_NO_ACTIVITY_FUNCTION));
-        Mockito.verify(console).print(Matchers.contains("junitDevice"));
+        Mockito.verify(console).print(contains("junitDevice"));
     }
 }
\ No newline at end of file
index 559a096cb4e44c907cf5e944df572e12011dafae..20508355d9f4ad949219b3bfb371472c8fda7640 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.contains;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
 
@@ -67,6 +68,6 @@ public class ShowSessionStatsCommandProviderTest extends AbstractKarafTest {
 
         showSessionStatsCommandProvider.execute(cmdSession);
         Assert.assertFalse(checkNoActivity(SessionStatistics.provideStatistics(), CHECK_NO_ACTIVITY_FUNCTION));
-        Mockito.verify(console).print(Matchers.contains(dummySessionId));
+        Mockito.verify(console).print(contains(dummySessionId));
     }
 }
\ No newline at end of file
index cb96800a741a4a4296e2bce55c6f86a988f4022f..b573d6f7888ac9793c65a3e0c9c7aa3e18e80be8 100644 (file)
@@ -8,12 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.karaf;
 
+import static org.mockito.ArgumentMatchers.matches;
+
 import com.google.common.base.Function;
 import javax.annotation.Nullable;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageIntelligenceAgency;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
@@ -46,7 +47,7 @@ public class ShowStatsCommandProviderTest extends AbstractKarafTest {
     @After
     public void tearDown() throws Exception {
         // Pattern.DOTALL is set inline via "(?s)" at the beginning
-        Mockito.verify(console).print(Matchers.matches("(?s).+"));
+        Mockito.verify(console).print(matches("(?s).+"));
         messageIntelligenceAgency.resetStatistics();
     }
 
index a6c7600ccdb6ab66aee9ca47e50d17c7df482a55..c7c0a62cb988b3479820c370ccda16c415ece983 100644 (file)
@@ -89,11 +89,6 @@ public class ContextChainHolderImplTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.doAnswer(invocation -> {
-            invocation.getArgumentAt(0, Runnable.class).run();
-            return null;
-        }).when(executorService).submit(Mockito.<Runnable>any());
-
 
         Mockito.when(connectionContext.getDeviceInfo()).thenReturn(deviceInfo);
         Mockito.when(deviceManager.createContext(connectionContext)).thenReturn(deviceContext);
@@ -178,8 +173,6 @@ public class ContextChainHolderImplTest {
     @Test
     public void reconciliationFrameworkSuccessButNotSubmit() throws Exception {
         contextChainHolder.createContextChain(connectionContext);
-        Mockito.when(reconciliationFrameworkEvent.onDevicePrepared(deviceInfo))
-            .thenReturn(Futures.immediateFuture(ResultState.DONOTHING));
         contextChainHolder.createContextChain(connectionContext);
         contextChainHolder.onMasterRoleAcquired(deviceInfo, ContextChainMastershipState.INITIAL_FLOW_REGISTRY_FILL);
         contextChainHolder.onMasterRoleAcquired(deviceInfo, ContextChainMastershipState.RPC_REGISTRATION);
index 9cf6628c4df723582bb0516fe6e020919b8fe323..690717634b9fa3d13d4d7815222ca9e51a391158 100644 (file)
@@ -63,7 +63,6 @@ public class ContextChainImplTest {
         Mockito.when(rpcContext.closeServiceInstance()).thenReturn(Futures.immediateFuture(null));
         Mockito.when(statisticsContext.closeServiceInstance()).thenReturn(Futures.immediateFuture(null));
         Mockito.when(connectionContext.getDeviceInfo()).thenReturn(deviceInfo);
-        Mockito.when(connectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
         Mockito.when(clusterSingletonServiceProvider.registerClusterSingletonService(Mockito.any()))
                 .thenReturn(clusterSingletonServiceRegistration);
 
index b9be54d89420ed90961601e35de37e8f015d5698..5998817c55b99ad4462985c9f22232f5eb5601d6 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.impl.registry.flow;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
index e1f1e4ffd7813f4ad3f8497dea69701095c46f5d..f9e9c600d7a6ea118a307740f44a9750da76f0c5 100644 (file)
@@ -62,7 +62,6 @@ public class FlowRegistryKeyFactoryTest {
             flowAndStatisticsMapListList.add(TestFlowHelper.createFlowAndStatisticsMapListBuilder(i).build());
         }
         FLOWS_STATISTICS_UPDATE_BUILDER.setFlowAndStatisticsMapList(flowAndStatisticsMapListList);
-        Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
         Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
     }
 
index 9b332b586b689702d2976bd26b9e58959f79faab..fa491d38ce8ad3f9be27aad91112e23c09d91215 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.role;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
index 202cadd98d7baf17de3c25f947523b7312a8a891..9ca563094f6910460071d3b0c2524152ef12bc48 100644 (file)
@@ -75,7 +75,6 @@ public class RpcContextImplTest {
         final NodeId nodeId = new NodeId("openflow:1");
         nodeInstanceIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(nodeId));
 
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
         when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
         when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
index 3fa77d09d0ec2b3cb9367dde0a3ae064c7d50891..722c7666971070703433dddddfc40535270022ed 100644 (file)
@@ -15,7 +15,6 @@ import java.util.concurrent.ConcurrentMap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -90,17 +89,9 @@ public class RpcManagerImplTest {
                 .setVersion(OFConstants.OFP_VERSION_1_3)
                 .build();
 
-        Mockito.when(deviceInfo.getNodeId()).thenReturn(nodeKey.getId());
         Mockito.when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodePath);
-        Mockito.when(connectionContext.getFeatures()).thenReturn(features);
-        Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
-        Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
         Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         Mockito.when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
-        Mockito.when(rpcProviderRegistry.addRoutedRpcImplementation(
-                Matchers.any(), Matchers.any(RpcService.class)))
-                .thenReturn(routedRpcRegistration);
-        Mockito.when(contexts.remove(deviceInfo)).thenReturn(removedContexts);
     }
 
     @Test
index 81c22459b1f1e1f90d19a3c9e65302a1e763de43..c752535ca0303406eab4d6296a315f631dcc11bc 100644 (file)
@@ -14,8 +14,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -58,7 +58,7 @@ public class MultipartRequestCallbackTest {
         Mockito.when(deviceContext.getMessageSpy()).thenReturn(spy);
 
         final OngoingStubbing<MultiMsgCollector<MultipartReply>> when =
-            Mockito.when(deviceContext.getMultiMsgCollector(Matchers.any()));
+            Mockito.when(deviceContext.getMultiMsgCollector(ArgumentMatchers.any()));
         when.thenReturn(multiMsgCollector);
         multipartRequestCallback = new MultiLayerMultipartRequestCallback<>(requestContext,
                                                                             MultipartRequestInput.class,
@@ -72,7 +72,7 @@ public class MultipartRequestCallbackTest {
     @Test
     public void testOnSuccess1() throws Exception {
         multipartRequestCallback.onSuccess(null);
-        Mockito.verify(multiMsgCollector).endCollecting(Matchers.<EventIdentifier>any());
+        Mockito.verify(multiMsgCollector).endCollecting(ArgumentMatchers.<EventIdentifier>any());
     }
 
     /**
@@ -94,6 +94,6 @@ public class MultipartRequestCallbackTest {
         final MultipartReplyMessage replyMessage = new MultipartReplyMessageBuilder().build();
         multipartRequestCallback.onSuccess(replyMessage);
         Mockito.verify(multiMsgCollector)
-                .addMultipartMsg(Matchers.eq(replyMessage), Matchers.eq(false), Matchers.any());
+                .addMultipartMsg(ArgumentMatchers.eq(replyMessage), ArgumentMatchers.eq(false), ArgumentMatchers.any());
     }
 }
index bf4a5bfeba5d09a473431014ac03638199f2339c..158fed166b35eb6430b6e1bd81ca077b1ee24cfb 100644 (file)
@@ -10,7 +10,8 @@ package org.opendaylight.openflowplugin.impl.services;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -25,7 +26,7 @@ import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -116,14 +117,7 @@ public class MultipartRequestOnTheFlyCallbackTest {
     public void initialization() {
         when(mockedDeviceContext.getMessageSpy()).thenReturn(new MessageIntelligenceAgencyImpl());
         when(mockedNodeId.toString()).thenReturn(DUMMY_NODE_ID);
-        when(mockedPrimaryConnection.getNodeId()).thenReturn(mockedNodeId);
         when(mockedPrimaryConnection.getFeatures()).thenReturn(mockedFeaturesReply);
-        when(mockedFeaturesReply.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
-        when(mockedFeaturesReply.getDatapathId()).thenReturn(BigInteger.valueOf(123L));
-
-        when(mocketGetFeaturesOutput.getTables()).thenReturn(tableId);
-        when(mocketGetFeaturesOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
-        when(mocketGetFeaturesOutput.getDatapathId()).thenReturn(BigInteger.valueOf(123L));
 
         when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimaryConnection);
         when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(NODE_PATH);
@@ -131,10 +125,9 @@ public class MultipartRequestOnTheFlyCallbackTest {
         when(mockedDeviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
         when(mockedDeviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
 
-        when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
         when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
         when(mockedDeviceContext.getDeviceFlowRegistry()).thenReturn(mockedFlowRegistry);
-        when(mockedFlowRegistry.retrieveDescriptor(Matchers.any(FlowRegistryKey.class)))
+        when(mockedFlowRegistry.retrieveDescriptor(any(FlowRegistryKey.class)))
                 .thenReturn(mockedFlowDescriptor);
 
         final InstanceIdentifier<FlowCapableNode> nodePath =
@@ -144,9 +137,6 @@ public class MultipartRequestOnTheFlyCallbackTest {
         final Optional<FlowCapableNode> flowNodeOpt = Optional.of(flowNodeBuilder.build());
         final CheckedFuture<Optional<FlowCapableNode>, ReadFailedException> flowNodeFuture =
                 Futures.immediateCheckedFuture(flowNodeOpt);
-        when(mockedReadOnlyTx.read(LogicalDatastoreType.OPERATIONAL, nodePath)).thenReturn(flowNodeFuture);
-        when(mockedDeviceContext.getReadTransaction()).thenReturn(mockedReadOnlyTx);
-
         dummyRequestContext = new AbstractRequestContext<List<MultipartReply>>(DUMMY_XID) {
 
             @Override
@@ -198,8 +188,8 @@ public class MultipartRequestOnTheFlyCallbackTest {
         assertEquals(expectedRpcResult.isSuccessful(), actualResult.isSuccessful());
 
         Mockito.verify(mockedDeviceContext, Mockito.never())
-                .writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.<InstanceIdentifier>any(), Matchers.<DataObject>any());
+                .writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                        ArgumentMatchers.<InstanceIdentifier>any(), ArgumentMatchers.<DataObject>any());
         Mockito.verify(mockedDeviceContext).submitTransaction();
     }
 
@@ -239,15 +229,13 @@ public class MultipartRequestOnTheFlyCallbackTest {
         final Optional<FlowCapableNode> flowNodeOpt = Optional.of(flowNodeBuilder.build());
         final CheckedFuture<Optional<FlowCapableNode>, ReadFailedException> flowNodeFuture = Futures
                 .immediateCheckedFuture(flowNodeOpt);
-        when(mockedReadOnlyTx.read(LogicalDatastoreType.OPERATIONAL, nodePath)).thenReturn(flowNodeFuture);
-        when(mockedDeviceContext.getReadTransaction()).thenReturn(mockedReadOnlyTx);
 
         multipartRequestOnTheFlyCallback.onSuccess(mpReplyMessage.build());
 
         verify(mockedReadOnlyTx, times(0)).read(LogicalDatastoreType.OPERATIONAL, nodePath);
         verify(mockedReadOnlyTx, times(0)).close();
         verify(mockedDeviceContext, times(1)).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.any(), Matchers.any());
+                any(), any());
     }
 
     /**
@@ -266,9 +254,9 @@ public class MultipartRequestOnTheFlyCallbackTest {
         // Nothing else than flow is supported by on the fly callback
         assertNotNull(actualResult.getErrors());
         assertFalse(actualResult.getErrors().isEmpty());
-        Mockito.verify(mockedFlowRegistry, Mockito.never()).store(Matchers.any());
+        Mockito.verify(mockedFlowRegistry, Mockito.never()).store(any());
         Mockito.verify(mockedDeviceContext, Mockito.never())
-                .writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.<InstanceIdentifier>any(), Matchers.<DataObject>any());
+                .writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                        ArgumentMatchers.<InstanceIdentifier>any(), ArgumentMatchers.<DataObject>any());
     }
 }
index 3a489cb17a30097d907a65683fa2796889a48a72..f096ce8c507d2ed3e078e1a097bc4f0344a396e5 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.openflowplugin.impl.services;
 
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.when;
 
 import com.google.common.util.concurrent.Futures;
@@ -97,34 +98,35 @@ public abstract class ServiceMocking {
     @Before
     @SuppressWarnings("unchecked")
     public void initialization() throws Exception {
-        when(mockedExtensionConverter.getExperimenterId())
+        lenient().when(mockedExtensionConverter.getExperimenterId())
                 .thenReturn(new ExperimenterId(DUMMY_EXPERIMENTER_ID));
-        when(mockedExtensionConverterProvider.getMessageConverter(Matchers.<TypeVersionKey>any()))
+        lenient().when(mockedExtensionConverterProvider.getMessageConverter(Matchers.<TypeVersionKey>any()))
                 .thenReturn(mockedExtensionConverter);
-        when(mockedRequestContextStack.createRequestContext()).thenReturn(mockedRequestContext);
-        when(mockedRequestContext.getXid()).thenReturn(DUMMY_XID);
-        when(mockedFeatures.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
-        when(mockedFeatures.getVersion()).thenReturn(DUMMY_VERSION);
+        lenient().when(mockedRequestContextStack.createRequestContext()).thenReturn(mockedRequestContext);
+        lenient().when(mockedRequestContext.getXid()).thenReturn(DUMMY_XID);
+        lenient().when(mockedFeatures.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
+        lenient().when(mockedFeatures.getVersion()).thenReturn(DUMMY_VERSION);
 
-        when(mockedFeaturesOutput.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
-        when(mockedFeaturesOutput.getVersion()).thenReturn(DUMMY_VERSION);
+        lenient().when(mockedFeaturesOutput.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
+        lenient().when(mockedFeaturesOutput.getVersion()).thenReturn(DUMMY_VERSION);
 
-        when(mockedPrimConnectionContext.getFeatures()).thenReturn(mockedFeatures);
-        when(mockedPrimConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
-        when(mockedPrimConnectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
-        when(mockedPrimConnectionContext.getOutboundQueueProvider()).thenReturn(mockedOutboundQueue);
+        lenient().when(mockedPrimConnectionContext.getFeatures()).thenReturn(mockedFeatures);
+        lenient().when(mockedPrimConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
+        lenient().when(mockedPrimConnectionContext.getConnectionState())
+                .thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
+        lenient().when(mockedPrimConnectionContext.getOutboundQueueProvider()).thenReturn(mockedOutboundQueue);
 
-        when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(DUMMY_NODE_II);
+        lenient().when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(DUMMY_NODE_II);
         when(mockedDeviceInfo.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
         when(mockedDeviceInfo.getVersion()).thenReturn(DUMMY_VERSION);
 
-        when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimConnectionContext);
+        lenient().when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimConnectionContext);
         when(mockedDeviceContext.getMessageSpy()).thenReturn(mockedMessagSpy);
-        when(mockedDeviceContext.getDeviceFlowRegistry())
+        lenient().when(mockedDeviceContext.getDeviceFlowRegistry())
                 .thenReturn(new DeviceFlowRegistryImpl(DUMMY_VERSION, dataBroker, DUMMY_NODE_II));
-        when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
+        lenient().when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
         when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
-        when(mockedDeviceContext.getMultiMsgCollector(Matchers.any())).thenReturn(multiMessageCollector);
+        lenient().when(mockedDeviceContext.getMultiMsgCollector(Matchers.any())).thenReturn(multiMessageCollector);
 
         setup();
     }
index ec7574380a676b6574c6258c447ec4b64123d5cc..c59addabc7ec9de2b9623fe1e9e03bc122054aff 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 
 import com.google.common.util.concurrent.FutureCallback;
@@ -17,7 +18,7 @@ import java.util.concurrent.Future;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.impl.services.ServiceMocking;
@@ -76,7 +77,7 @@ public class SalAsyncConfigServiceImplTest extends ServiceMocking {
         Assert.assertTrue(getAsyncResult.isDone());
         Assert.assertTrue(getAsyncResult.get().isSuccessful());
         verify(mockedRequestContextStack).createRequestContext();
-        verify(mockedOutboundQueue).commitEntry(Matchers.eq(ServiceMocking.DUMMY_XID_VALUE),
-                Matchers.<OfHeader>any(), Matchers.<FutureCallback<OfHeader>>any());
+        verify(mockedOutboundQueue).commitEntry(eq(ServiceMocking.DUMMY_XID_VALUE),
+                ArgumentMatchers.<OfHeader>any(), ArgumentMatchers.<FutureCallback<OfHeader>>any());
     }
 }
index fd76f4e1f57b48343bd0f782a1ef01996ce231f9..8af79bc7d28baa27ac17b974ff8a777445ba581e 100644 (file)
@@ -8,13 +8,14 @@
 
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.ArrayList;
 import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -84,7 +85,7 @@ public class SalBundleServiceImplTest {
         experimenterBuilder.setExperimenterMessageOfChoice(new BundleControlSalBuilder()
                 .setSalControlData(new SalControlDataBuilder(input).build())
                 .build());
-        Mockito.when(experimenterMessageService.sendExperimenter(Matchers.any())).thenReturn(SettableFuture.create());
+        Mockito.when(experimenterMessageService.sendExperimenter(any())).thenReturn(SettableFuture.create());
         service.controlBundle(input);
         Mockito.verify(experimenterMessageService).sendExperimenter(experimenterBuilder.build());
     }
@@ -106,7 +107,7 @@ public class SalBundleServiceImplTest {
         final BundleAddMessageSalBuilder addMessageBuilder = new BundleAddMessageSalBuilder();
         final SendExperimenterInputBuilder experimenterBuilder = new SendExperimenterInputBuilder()
                 .setNode(NODE_REF);
-        Mockito.when(experimenterMessageService.sendExperimenter(Matchers.any())).thenReturn(SettableFuture.create());
+        Mockito.when(experimenterMessageService.sendExperimenter(any())).thenReturn(SettableFuture.create());
         service.addBundleMessages(input);
         for (Message msg : innerMessages) {
             Mockito.verify(experimenterMessageService)
index 683abf9093f3721135247adb33b454a8cc603570..ee29c35c5e448d2f3b21cf7eb7a8f92bb42b0b56 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 
 import com.google.common.util.concurrent.FutureCallback;
@@ -16,7 +17,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 import java.util.concurrent.Future;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.impl.services.ServiceMocking;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.echo.service.rev150305.SendEchoInput;
@@ -57,6 +58,7 @@ public class SalEchoServiceImplTest extends ServiceMocking {
         Assert.assertTrue(echoOutput.get().isSuccessful());
         verify(mockedRequestContextStack).createRequestContext();
         verify(mockedOutboundQueue)
-                .commitEntry(Matchers.eq(2121L), Matchers.<OfHeader>any(), Matchers.<FutureCallback<OfHeader>>any());
+                .commitEntry(eq(2121L), ArgumentMatchers.<OfHeader>any(),
+                        ArgumentMatchers.<FutureCallback<OfHeader>>any());
     }
 }
index 866cc862db70907a740a248fe4037e1dff018ab9..ecfe9392477631f689c9fb4c0cfe79cabfba6ca1 100644 (file)
@@ -10,10 +10,11 @@ package org.opendaylight.openflowplugin.impl.services.sal;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 
 import org.junit.Test;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
@@ -48,7 +49,7 @@ public class SalExperimenterMessageServiceImplTest extends ServiceMocking {
         salExperimenterMessageService = new SalExperimenterMessageServiceImpl(mockedRequestContextStack,
                                                                               mockedDeviceContext,
                                                                               extensionConverterProvider);
-        Mockito.when(extensionConverterProvider.getMessageConverter(Matchers.<TypeVersionKey>any()))
+        Mockito.when(extensionConverterProvider.getMessageConverter(ArgumentMatchers.<TypeVersionKey>any()))
                 .thenReturn(extensionConverter);
         Mockito.when(extensionConverter.getExperimenterId()).thenReturn(new ExperimenterId(43L));
         Mockito.when(extensionConverter.getType()).thenReturn(44L);
@@ -71,8 +72,8 @@ public class SalExperimenterMessageServiceImplTest extends ServiceMocking {
         final ExperimenterInput input = (ExperimenterInput) request;
         assertEquals(43L, input.getExperimenter().getValue().longValue());
         assertEquals(44L, input.getExpType().longValue());
-        Mockito.verify(extensionConverter).convert(Matchers.eq(sendExperimenterInput.getExperimenterMessageOfChoice()),
-                Matchers.any(ExtensionConvertorData.class));
+        Mockito.verify(extensionConverter).convert(eq(sendExperimenterInput.getExperimenterMessageOfChoice()),
+                ArgumentMatchers.any(ExtensionConvertorData.class));
     }
 
     private SendExperimenterInput buildSendExperimenterInput() {
index 3c380b8e6075de51f17a5748c871743b209cd355..ecae3b0c2b9d7bf44c57335fcf1f41d66d208abd 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import java.util.List;
 import org.junit.Test;
@@ -17,7 +16,6 @@ import org.opendaylight.openflowplugin.impl.services.ServiceMocking;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.mp.message.service.rev151020.SendExperimenterMpRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.mp.message.service.rev151020.SendExperimenterMpRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
 
 public class SalExperimenterMpMessageServiceImplTest extends ServiceMocking {
@@ -27,8 +25,6 @@ public class SalExperimenterMpMessageServiceImplTest extends ServiceMocking {
     @SuppressWarnings("unchecked")
     protected void setup() {
         this.<List<MultipartReply>>mockSuccessfulFuture();
-        when(mockedExtensionConverter.getType())
-                .thenReturn((long) MultipartType.OFPMPEXPERIMENTER.getIntValue());
 
         salExperimenterMpMessageService = new SalExperimenterMpMessageServiceImpl(
                 mockedRequestContextStack,
index 385d3d2e33656f90d2b04aebc7edbdb46eab5ff1..4a4f3da3ac94a061e845ca7160c06be6482ca44d 100644 (file)
@@ -21,9 +21,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -137,25 +137,25 @@ public class SalFlatBatchServiceImplTest {
 
     @Test
     public void testProcessFlatBatch_allSuccessFinished() throws Exception {
-        Mockito.when(salFlowsBatchService.addFlowsBatch(Matchers.<AddFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddFlowsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salFlowsBatchService.removeFlowsBatch(Matchers.<RemoveFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.removeFlowsBatch(ArgumentMatchers.<RemoveFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveFlowsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salFlowsBatchService.updateFlowsBatch(Matchers.<UpdateFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.updateFlowsBatch(ArgumentMatchers.<UpdateFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateFlowsBatchOutputBuilder().build()).buildFuture());
 
-        Mockito.when(salGroupsBatchService.addGroupsBatch(Matchers.<AddGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.addGroupsBatch(ArgumentMatchers.<AddGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddGroupsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salGroupsBatchService.removeGroupsBatch(Matchers.<RemoveGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.removeGroupsBatch(ArgumentMatchers.<RemoveGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveGroupsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salGroupsBatchService.updateGroupsBatch(Matchers.<UpdateGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.updateGroupsBatch(ArgumentMatchers.<UpdateGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateGroupsBatchOutputBuilder().build()).buildFuture());
 
-        Mockito.when(salMetersBatchService.addMetersBatch(Matchers.<AddMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.addMetersBatch(ArgumentMatchers.<AddMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddMetersBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salMetersBatchService.removeMetersBatch(Matchers.<RemoveMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.removeMetersBatch(ArgumentMatchers.<RemoveMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveMetersBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salMetersBatchService.updateMetersBatch(Matchers.<UpdateMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.updateMetersBatch(ArgumentMatchers.<UpdateMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateMetersBatchOutputBuilder().build()).buildFuture());
 
 
@@ -186,17 +186,17 @@ public class SalFlatBatchServiceImplTest {
         Assert.assertTrue(rpcResult.getResult().getBatchFailure().isEmpty());
 
         final InOrder inOrder = Mockito.inOrder(salFlowsBatchService, salGroupsBatchService, salMetersBatchService);
-        inOrder.verify(salFlowsBatchService).addFlowsBatch(Matchers.<AddFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).removeFlowsBatch(Matchers.<RemoveFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).updateFlowsBatch(Matchers.<UpdateFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).removeFlowsBatch(ArgumentMatchers.<RemoveFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).updateFlowsBatch(ArgumentMatchers.<UpdateFlowsBatchInput>any());
 
-        inOrder.verify(salGroupsBatchService).addGroupsBatch(Matchers.<AddGroupsBatchInput>any());
-        inOrder.verify(salGroupsBatchService).removeGroupsBatch(Matchers.<RemoveGroupsBatchInput>any());
-        inOrder.verify(salGroupsBatchService).updateGroupsBatch(Matchers.<UpdateGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).addGroupsBatch(ArgumentMatchers.<AddGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).removeGroupsBatch(ArgumentMatchers.<RemoveGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).updateGroupsBatch(ArgumentMatchers.<UpdateGroupsBatchInput>any());
 
-        inOrder.verify(salMetersBatchService).addMetersBatch(Matchers.<AddMetersBatchInput>any());
-        inOrder.verify(salMetersBatchService).removeMetersBatch(Matchers.<RemoveMetersBatchInput>any());
-        inOrder.verify(salMetersBatchService).updateMetersBatch(Matchers.<UpdateMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).addMetersBatch(ArgumentMatchers.<AddMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).removeMetersBatch(ArgumentMatchers.<RemoveMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).updateMetersBatch(ArgumentMatchers.<UpdateMetersBatchInput>any());
     }
 
     @Test
@@ -232,10 +232,10 @@ public class SalFlatBatchServiceImplTest {
         Assert.assertEquals(3, rpcResult.getResult().getBatchFailure().get(0).getBatchOrder().intValue());
 
         final InOrder inOrder = Mockito.inOrder(salFlowsBatchService, salGroupsBatchService, salMetersBatchService);
-        inOrder.verify(salFlowsBatchService).addFlowsBatch(Matchers.<AddFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).removeFlowsBatch(Matchers.<RemoveFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).updateFlowsBatch(Matchers.<UpdateFlowsBatchInput>any());
-        inOrder.verify(salGroupsBatchService).addGroupsBatch(Matchers.<AddGroupsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).removeFlowsBatch(ArgumentMatchers.<RemoveFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).updateFlowsBatch(ArgumentMatchers.<UpdateFlowsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).addGroupsBatch(ArgumentMatchers.<AddGroupsBatchInput>any());
     }
 
     @Test
@@ -271,23 +271,23 @@ public class SalFlatBatchServiceImplTest {
         Assert.assertEquals(3, rpcResult.getResult().getBatchFailure().get(0).getBatchOrder().intValue());
 
         final InOrder inOrder = Mockito.inOrder(salFlowsBatchService, salGroupsBatchService, salMetersBatchService);
-        inOrder.verify(salFlowsBatchService).addFlowsBatch(Matchers.<AddFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).removeFlowsBatch(Matchers.<RemoveFlowsBatchInput>any());
-        inOrder.verify(salFlowsBatchService).updateFlowsBatch(Matchers.<UpdateFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).removeFlowsBatch(ArgumentMatchers.<RemoveFlowsBatchInput>any());
+        inOrder.verify(salFlowsBatchService).updateFlowsBatch(ArgumentMatchers.<UpdateFlowsBatchInput>any());
 
-        inOrder.verify(salGroupsBatchService).addGroupsBatch(Matchers.<AddGroupsBatchInput>any());
-        inOrder.verify(salGroupsBatchService).removeGroupsBatch(Matchers.<RemoveGroupsBatchInput>any());
-        inOrder.verify(salGroupsBatchService).updateGroupsBatch(Matchers.<UpdateGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).addGroupsBatch(ArgumentMatchers.<AddGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).removeGroupsBatch(ArgumentMatchers.<RemoveGroupsBatchInput>any());
+        inOrder.verify(salGroupsBatchService).updateGroupsBatch(ArgumentMatchers.<UpdateGroupsBatchInput>any());
 
-        inOrder.verify(salMetersBatchService).addMetersBatch(Matchers.<AddMetersBatchInput>any());
-        inOrder.verify(salMetersBatchService).removeMetersBatch(Matchers.<RemoveMetersBatchInput>any());
-        inOrder.verify(salMetersBatchService).updateMetersBatch(Matchers.<UpdateMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).addMetersBatch(ArgumentMatchers.<AddMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).removeMetersBatch(ArgumentMatchers.<RemoveMetersBatchInput>any());
+        inOrder.verify(salMetersBatchService).updateMetersBatch(ArgumentMatchers.<UpdateMetersBatchInput>any());
     }
 
     private void prepareFirstFailingMockService() {
-        Mockito.when(salFlowsBatchService.addFlowsBatch(Matchers.<AddFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddFlowsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salFlowsBatchService.removeFlowsBatch(Matchers.<RemoveFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.removeFlowsBatch(ArgumentMatchers.<RemoveFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.<RemoveFlowsBatchOutput>failed()
                         .withResult(new RemoveFlowsBatchOutputBuilder()
                                 .setBatchFailedFlowsOutput(Lists.newArrayList(
@@ -298,21 +298,21 @@ public class SalFlatBatchServiceImplTest {
                                 .build())
                         .withError(RpcError.ErrorType.APPLICATION, "ut-firstFlowAddError")
                         .buildFuture());
-        Mockito.when(salFlowsBatchService.updateFlowsBatch(Matchers.<UpdateFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.updateFlowsBatch(ArgumentMatchers.<UpdateFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateFlowsBatchOutputBuilder().build()).buildFuture());
 
-        Mockito.when(salGroupsBatchService.addGroupsBatch(Matchers.<AddGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.addGroupsBatch(ArgumentMatchers.<AddGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddGroupsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salGroupsBatchService.removeGroupsBatch(Matchers.<RemoveGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.removeGroupsBatch(ArgumentMatchers.<RemoveGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveGroupsBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salGroupsBatchService.updateGroupsBatch(Matchers.<UpdateGroupsBatchInput>any()))
+        Mockito.when(salGroupsBatchService.updateGroupsBatch(ArgumentMatchers.<UpdateGroupsBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateGroupsBatchOutputBuilder().build()).buildFuture());
 
-        Mockito.when(salMetersBatchService.addMetersBatch(Matchers.<AddMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.addMetersBatch(ArgumentMatchers.<AddMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddMetersBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salMetersBatchService.removeMetersBatch(Matchers.<RemoveMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.removeMetersBatch(ArgumentMatchers.<RemoveMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveMetersBatchOutputBuilder().build()).buildFuture());
-        Mockito.when(salMetersBatchService.updateMetersBatch(Matchers.<UpdateMetersBatchInput>any()))
+        Mockito.when(salMetersBatchService.updateMetersBatch(ArgumentMatchers.<UpdateMetersBatchInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateMetersBatchOutputBuilder().build()).buildFuture());
     }
 
@@ -463,9 +463,9 @@ public class SalFlatBatchServiceImplTest {
                                     createFlowBatchFailure(1, "f2")))
                         .buildFuture();
 
-        Mockito.when(batchStepJob1.getStepFunction().apply(Matchers.<RpcResult<ProcessFlatBatchOutput>>any()))
+        Mockito.when(batchStepJob1.getStepFunction().apply(ArgumentMatchers.<RpcResult<ProcessFlatBatchOutput>>any()))
                 .thenReturn(succeededChainOutput);
-        Mockito.when(batchStepJob2.getStepFunction().apply(Matchers.<RpcResult<ProcessFlatBatchOutput>>any()))
+        Mockito.when(batchStepJob2.getStepFunction().apply(ArgumentMatchers.<RpcResult<ProcessFlatBatchOutput>>any()))
                 .thenReturn(failedChainOutput);
 
         final List<BatchStepJob> batchChainElements = Lists.newArrayList(batchStepJob1, batchStepJob2);
@@ -510,7 +510,7 @@ public class SalFlatBatchServiceImplTest {
 
         Assert.assertEquals(1, batchChain.size());
 
-        Mockito.when(salFlowsBatchService.addFlowsBatch(Matchers.<AddFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder
                         .success(new AddFlowsBatchOutputBuilder().build())
                         .buildFuture());
@@ -523,7 +523,7 @@ public class SalFlatBatchServiceImplTest {
         Assert.assertEquals(0, rpcResult.getErrors().size());
         Assert.assertEquals(0, rpcResult.getResult().getBatchFailure().size());
 
-        Mockito.verify(salFlowsBatchService).addFlowsBatch(Matchers.<AddFlowsBatchInput>any());
+        Mockito.verify(salFlowsBatchService).addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any());
     }
 
     @Test
@@ -540,7 +540,7 @@ public class SalFlatBatchServiceImplTest {
 
         Assert.assertEquals(2, batchChain.size());
 
-        Mockito.when(salFlowsBatchService.addFlowsBatch(Matchers.<AddFlowsBatchInput>any()))
+        Mockito.when(salFlowsBatchService.addFlowsBatch(ArgumentMatchers.<AddFlowsBatchInput>any()))
                 .thenReturn(RpcResultBuilder
                         .<AddFlowsBatchOutput>failed()
                         .withResult(new AddFlowsBatchOutputBuilder()
index 4f1fd3c62669d42370a40873ee5f5fa87cf0b50f..af67ef1b5882c11f5e081b55c30f1d52244ed787 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -18,7 +19,6 @@ import junit.framework.TestCase;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -113,11 +113,7 @@ public class SalFlowServiceImplTest extends TestCase {
 
     @Before
     public void initialization() {
-        when(mockedFeatures.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
-        when(mockedFeaturesOutput.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
 
-        when(mockedPrimConnectionContext.getFeatures()).thenReturn(mockedFeatures);
-        when(mockedPrimConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
         when(mockedPrimConnectionContext.getOutboundQueueProvider()).thenReturn(outboundQueue);
 
         when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimConnectionContext);
@@ -128,10 +124,8 @@ public class SalFlowServiceImplTest extends TestCase {
         when(requestContext.getFuture()).thenReturn(RpcResultBuilder.success().buildFuture());
         when(mockedRequestContextStack.createRequestContext()).thenReturn(requestContext);
 
-        when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(NODE_II);
         when(mockedDeviceInfo.getDatapathId()).thenReturn(DUMMY_DATAPATH_ID);
 
-        when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
         when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
     }
 
@@ -307,10 +301,9 @@ public class SalFlowServiceImplTest extends TestCase {
         FlowDescriptor mockedFlowDescriptor = mock(FlowDescriptor.class);
         FlowId flowId = new FlowId(DUMMY_FLOW_ID);
         when(mockedFlowDescriptor.getFlowId()).thenReturn(flowId);
-        when(mockedFlowDescriptor.getTableKey()).thenReturn(new TableKey(DUMMY_TABLE_ID));
 
         when(deviceFlowRegistry
-                .retrieveDescriptor(Matchers.any(FlowRegistryKey.class))).thenReturn(mockedFlowDescriptor);
+                .retrieveDescriptor(any(FlowRegistryKey.class))).thenReturn(mockedFlowDescriptor);
     }
 
     private <T extends DataObject> void verifyOutput(Future<RpcResult<T>> rpcResultFuture) throws ExecutionException,
index 6e2941af38ec8110e2f725a6202c495210e83137..e5f9b77e5c70b01eb3dfa85f562f9d62d4fb6573 100644 (file)
@@ -17,9 +17,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -99,7 +99,7 @@ public class SalFlowsBatchServiceImplTest {
     public void setUp() throws Exception {
         salFlowsBatchService = new SalFlowsBatchServiceImpl(salFlowService, transactionService);
 
-        Mockito.when(transactionService.sendBarrier(Matchers.<SendBarrierInput>any()))
+        Mockito.when(transactionService.sendBarrier(ArgumentMatchers.<SendBarrierInput>any()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
     }
 
@@ -110,7 +110,7 @@ public class SalFlowsBatchServiceImplTest {
 
     @Test
     public void testRemoveFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.removeFlow(Matchers.<RemoveFlowInput>any()))
+        Mockito.when(salFlowService.removeFlow(ArgumentMatchers.<RemoveFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new RemoveFlowOutputBuilder().build())
                         .buildFuture());
 
@@ -141,12 +141,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testRemoveFlowsBatch_failed() throws Exception {
-        Mockito.when(salFlowService.removeFlow(Matchers.<RemoveFlowInput>any()))
+        Mockito.when(salFlowService.removeFlow(ArgumentMatchers.<RemoveFlowInput>any()))
                 .thenReturn(RpcResultBuilder.<RemoveFlowOutput>failed()
                         .withError(RpcError.ErrorType.APPLICATION, "flow-remove-fail-1")
                         .buildFuture());
@@ -178,7 +178,7 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     private static BatchAddFlows createEmptyBatchAddFlow(final String flowIdValue, final int priority) {
@@ -211,7 +211,7 @@ public class SalFlowsBatchServiceImplTest {
 
     @Test
     public void testAddFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.addFlow(Matchers.<AddFlowInput>any()))
+        Mockito.when(salFlowService.addFlow(ArgumentMatchers.<AddFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new AddFlowOutputBuilder().build()).buildFuture());
 
         final AddFlowsBatchInput input = new AddFlowsBatchInputBuilder()
@@ -235,12 +235,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testAddFlowsBatch_failed() throws Exception {
-        Mockito.when(salFlowService.addFlow(Matchers.<AddFlowInput>any()))
+        Mockito.when(salFlowService.addFlow(ArgumentMatchers.<AddFlowInput>any()))
                 .thenReturn(RpcResultBuilder
                         .<AddFlowOutput>failed().withError(RpcError.ErrorType.APPLICATION, "ut-groupAddError")
                         .buildFuture());
@@ -272,12 +272,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(42, allValues.get(0).getPriority().longValue());
         Assert.assertEquals(43, allValues.get(1).getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testUpdateFlowsBatch_success() throws Exception {
-        Mockito.when(salFlowService.updateFlow(Matchers.<UpdateFlowInput>any()))
+        Mockito.when(salFlowService.updateFlow(ArgumentMatchers.<UpdateFlowInput>any()))
                 .thenReturn(RpcResultBuilder.success(new UpdateFlowOutputBuilder().build()).buildFuture());
 
         final UpdateFlowsBatchInput input = new UpdateFlowsBatchInputBuilder()
@@ -303,12 +303,12 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalFlow().getPriority().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedFlow().getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
     public void testUpdateFlowsBatch_failure() throws Exception {
-        Mockito.when(salFlowService.updateFlow(Matchers.<UpdateFlowInput>any()))
+        Mockito.when(salFlowService.updateFlow(ArgumentMatchers.<UpdateFlowInput>any()))
                 .thenReturn(RpcResultBuilder.<UpdateFlowOutput>failed()
                         .withError(RpcError.ErrorType.APPLICATION, "ut-flowUpdateError")
                         .buildFuture());
@@ -342,6 +342,6 @@ public class SalFlowsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalFlow().getPriority().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedFlow().getPriority().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 }
index 11e917eafbe6daf9a884e656f14acecb8a5f721c..3f3950635a142deba682c67eda7d8a9a3697c88b 100755 (executable)
@@ -8,10 +8,8 @@
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import org.junit.Test;
-
 import org.mockito.Mock;
 import org.opendaylight.openflowplugin.api.openflow.registry.group.DeviceGroupRegistry;
 import org.opendaylight.openflowplugin.impl.services.ServiceMocking;
@@ -43,7 +41,6 @@ public class SalGroupServiceImplTest extends ServiceMocking {
 
     @Override
     protected void setup() {
-        when(mockedDeviceContext.getDeviceGroupRegistry()).thenReturn(mockedDeviceGroupRegistry);
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
         salGroupService = new SalGroupServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
     }
index 8eef763b369b51b235de0fd8420355ed97ddbce4..181681028594d3e4fe913094362b5bec4b12c7a0 100644 (file)
@@ -17,9 +17,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -93,7 +93,7 @@ public class SalGroupsBatchServiceImplTest {
     public void setUp() throws Exception {
         salGroupsBatchService = new SalGroupsBatchServiceImpl(salGroupService, transactionService);
 
-        Mockito.when(transactionService.sendBarrier(Matchers.<SendBarrierInput>any()))
+        Mockito.when(transactionService.sendBarrier(ArgumentMatchers.<SendBarrierInput>any()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
     }
 
@@ -129,7 +129,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalGroup().getGroupId().getValue().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedGroup().getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -168,7 +168,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalGroup().getGroupId().getValue().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedGroup().getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
 
@@ -197,7 +197,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getGroupId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -234,7 +234,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getGroupId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -263,7 +263,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getGroupId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -300,7 +300,7 @@ public class SalGroupsBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getGroupId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getGroupId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     private static BatchAddGroups createEmptyBatchAddGroup(final long groupIdValue) {
index 5f141364814727d52d519e3f04654ed3f74a7e2e..68ca0c0bd302e06931ace7adc7623d52080d2f62 100755 (executable)
@@ -8,7 +8,6 @@
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import org.junit.Test;
 import org.mockito.Mock;
@@ -42,7 +41,6 @@ public class SalMeterServiceImplTest extends ServiceMocking {
 
     @Override
     protected void setup() {
-        when(mockedDeviceContext.getDeviceMeterRegistry()).thenReturn(mockedDeviceMeterRegistry);
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
         salMeterService = new SalMeterServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
     }
index 5c43de2b48c8afb34645467740bc4661816db02d..732187bf1044827fcd824cde207287e951ffb842 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.collect.Lists;
 import java.util.List;
 import java.util.concurrent.Future;
@@ -17,9 +19,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Captor;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -92,7 +94,7 @@ public class SalMetersBatchServiceImplTest {
     public void setUp() throws Exception {
         salMetersBatchService = new SalMetersBatchServiceImpl(salMeterService, transactionService);
 
-        Mockito.when(transactionService.sendBarrier(Matchers.any()))
+        Mockito.when(transactionService.sendBarrier(any()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
     }
 
@@ -128,7 +130,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalMeter().getMeterId().getValue().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedMeter().getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -167,7 +169,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(44, allValues.get(1).getOriginalMeter().getMeterId().getValue().longValue());
         Assert.assertEquals(45, allValues.get(1).getUpdatedMeter().getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
 
@@ -196,7 +198,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getMeterId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -233,7 +235,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getMeterId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -262,7 +264,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getMeterId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     @Test
@@ -299,7 +301,7 @@ public class SalMetersBatchServiceImplTest {
         Assert.assertEquals(42L, allValues.get(0).getMeterId().getValue().longValue());
         Assert.assertEquals(43L, allValues.get(1).getMeterId().getValue().longValue());
 
-        inOrder.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        inOrder.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
     }
 
     private static BatchAddMeters createEmptyBatchAddMeter(final long groupIdValue) {
index 3397a303f4c3b33778ef4de7f8f46cfdadc28681..2743236acd65d0bac959cd873eb34c73eafd17e4 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -18,7 +19,7 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import org.junit.Assert;
 import org.junit.Test;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.stubbing.Answer;
@@ -62,7 +63,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
             return null;
         })
                 .when(mockedOutboundQueue).commitEntry(
-                Matchers.anyLong(), Matchers.<OfHeader>any(), Matchers.<FutureCallback<OfHeader>>any());
+                anyLong(), ArgumentMatchers.<OfHeader>any(), ArgumentMatchers.<FutureCallback<OfHeader>>any());
 
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
         salTableService = new SalTableServiceImpl(mockedRequestContextStack, mockedDeviceContext,
@@ -76,7 +77,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
                     RpcResultBuilder.<List<MultipartReply>>failed().build();
             handleResultFuture.set(rpcResult);
             return null;
-        }).when(multiMessageCollector).endCollecting(Matchers.<EventIdentifier>any());
+        }).when(multiMessageCollector).endCollecting(ArgumentMatchers.<EventIdentifier>any());
 
         final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
@@ -91,7 +92,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
                     .build();
             handleResultFuture.set(rpcResult);
             return null;
-        }).when(multiMessageCollector).endCollecting(Matchers.<EventIdentifier>any());
+        }).when(multiMessageCollector).endCollecting(ArgumentMatchers.<EventIdentifier>any());
 
         final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
@@ -119,7 +120,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
                     .build();
             handleResultFuture.set(rpcResult);
             return null;
-        }).when(multiMessageCollector).endCollecting(Matchers.<EventIdentifier>any());
+        }).when(multiMessageCollector).endCollecting(ArgumentMatchers.<EventIdentifier>any());
 
         final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
index 96bf8178194766ee9d06552176e72f3cba11816a..33548413079bc034da3370e4a9f5858e8afa1858 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.services.util;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
index 310f89c0ec38022c36a4552c93e635a019ab6032..3fdd2e054cd3c559c116fa7e7195beff551ca3cc 100644 (file)
@@ -91,10 +91,8 @@ class StatisticsContextImpMockInitiation {
         when(mockedDeviceContext.getMessageSpy()).thenReturn(mockedMessageSpy);
         when(mockedDeviceInfo.getNodeId()).thenReturn(DUMMY_NODE_ID.getKey().getId());
 
-        when(mockedConnectionContext.getNodeId()).thenReturn(DUMMY_NODE_ID.getKey().getId());
         when(mockedConnectionContext.getFeatures()).thenReturn(mockedFeatures);
         when(mockedConnectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
-        when(mockedConnectionContext.getOutboundQueueProvider()).thenReturn(mockedOutboundQueue);
 
     }
 }
index d46dad3eeea4a298add46b73c1ffa96738cbf789..17672c9efeb845bb20ad91e5603842d803047081 100644 (file)
@@ -9,7 +9,7 @@
 package org.opendaylight.openflowplugin.impl.statistics;
 
 import static com.google.common.util.concurrent.Futures.immediateFuture;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -24,7 +24,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
@@ -113,9 +112,9 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
         statisticsContext.instantiateServiceInstance();
 
         verify(mockedStatisticsGatheringService, times(7))
-                .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class));
+                .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class));
         verify(mockedStatisticsOnFlyGatheringService)
-                .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class));
+                .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class));
     }
 
 }
index 509f5ad7b19720586330631b7ad39e0d7e4e55d9..aa3bbad44ca743997d46f5c8de0e5e5ca8b98354 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.impl.statistics;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -21,7 +22,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -137,11 +137,11 @@ public class StatisticsContextImplTest extends StatisticsContextImpMockInitiatio
         initStatisticsContext();
 
         when(mockedStatisticsGatheringService
-                     .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class)))
+                     .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class)))
                 .thenReturn(Futures.immediateFuture(
                         RpcResultBuilder.success(Collections.<MultipartReply>emptyList()).build()));
         when(mockedStatisticsOnFlyGatheringService
-                     .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class)))
+                     .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class)))
                 .thenReturn(Futures.immediateFuture(
                         RpcResultBuilder.success(Collections.<MultipartReply>emptyList()).build()));
 
@@ -151,9 +151,9 @@ public class StatisticsContextImplTest extends StatisticsContextImpMockInitiatio
         statisticsContext.instantiateServiceInstance();
 
         verify(mockedStatisticsGatheringService, times(7))
-                .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class));
+                .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class));
         verify(mockedStatisticsOnFlyGatheringService)
-                .getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.any(MultipartType.class));
+                .getStatisticsOfType(any(EventIdentifier.class), any(MultipartType.class));
         Mockito.verifyNoMoreInteractions(mockedStatisticsGatheringService, mockedStatisticsOnFlyGatheringService);
     }
 }
index 3e4da90a3283e59a1bf1dc049db561bfcdb3e4b7..e20411a9531d20695c491cf39f0eefa7326a1bd0 100755 (executable)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.statistics;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -28,8 +30,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -172,17 +174,15 @@ public class StatisticsGatheringUtilsTest {
 
     @Before
     public void setUp() throws Exception {
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         when(deviceContext.getDeviceFlowRegistry()).thenReturn(deviceFlowRegistry);
         when(deviceContext.getDeviceGroupRegistry()).thenReturn(deviceGroupRegistry);
         when(deviceContext.getDeviceMeterRegistry()).thenReturn(deviceMeterRegistry);
-        when(deviceFlowRegistry.retrieveDescriptor(Matchers.any(FlowRegistryKey.class))).thenReturn(flowDescriptor);
+        when(deviceFlowRegistry.retrieveDescriptor(any(FlowRegistryKey.class))).thenReturn(flowDescriptor);
         when(deviceContext.getReadTransaction()).thenReturn(readTx);
         when(deviceContext.getReadTransaction()).thenReturn(readTx);
         when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionAdapter);
         when(deviceContext.isTransactionsEnabled()).thenReturn(Boolean.TRUE);
-        when(connectionAdapter.getNodeId()).thenReturn(DUMMY_NODE_ID);
         when(connectionAdapter.getFeatures()).thenReturn(features);
         when(features.getDatapathId()).thenReturn(BigInteger.ONE);
         when(features.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
@@ -205,7 +205,7 @@ public class StatisticsGatheringUtilsTest {
                 dataStoreType.capture(), flowPath.capture(), flow.capture());
         Assert.assertEquals(LogicalDatastoreType.OPERATIONAL, dataStoreType.getValue());
         final InstanceIdentifier<FlowCapableNode> flowCapableNodePath = flowPath.getValue();
-        Assert.assertEquals(DUMMY_NODE_ID, flowCapableNodePath.firstKeyOf(Node.class, NodeKey.class).getId());
+        Assert.assertEquals(DUMMY_NODE_ID, flowCapableNodePath.firstKeyOf(Node.class).getId());
         Assert.assertEquals(42, flow.getValue().getTableId().intValue());
     }
 
@@ -249,8 +249,8 @@ public class StatisticsGatheringUtilsTest {
                         .opendaylight.group.types.rev131018.GroupId(groupIdValue)))
                 .augmentation(NodeGroupStatistics.class)
                 .child(GroupStatistics.class);
-        verify(deviceContext).writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.eq(groupPath), Matchers.any(GroupStatistics.class));
+        verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                eq(groupPath), any(GroupStatistics.class));
     }
 
     @Test
@@ -279,11 +279,11 @@ public class StatisticsGatheringUtilsTest {
         final KeyedInstanceIdentifier<Group, GroupKey> groupPath =
                 dummyNodePath.augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(storedGroupId));
 
-        verify(deviceContext, Mockito.never()).addDeleteToTxChain(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                                  Matchers.<InstanceIdentifier<?>>any());
+        verify(deviceContext, Mockito.never()).addDeleteToTxChain(eq(LogicalDatastoreType.OPERATIONAL),
+                ArgumentMatchers.<InstanceIdentifier<?>>any());
         verify(deviceGroupRegistry).store(storedGroupId);
-        verify(deviceContext).writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                 Matchers.eq(groupPath), Matchers.any(Group.class));
+        verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                                                 eq(groupPath), any(Group.class));
     }
 
     @Test
@@ -317,8 +317,8 @@ public class StatisticsGatheringUtilsTest {
                         .opendaylight.meter.types.rev130918.MeterId(meterIdValue)))
                 .augmentation(NodeMeterStatistics.class)
                 .child(MeterStatistics.class);
-        verify(deviceContext).writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.eq(meterPath), Matchers.any(MeterStatistics.class));
+        verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                eq(meterPath), any(MeterStatistics.class));
     }
 
     @Test
@@ -343,9 +343,9 @@ public class StatisticsGatheringUtilsTest {
                 .augmentation(FlowCapableNodeConnectorStatisticsData.class)
                 .child(FlowCapableNodeConnectorStatistics.class);
         verify(deviceContext).writeToTransaction(
-                Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.eq(portPath),
-                Matchers.any(FlowCapableNodeConnectorStatistics.class));
+                eq(LogicalDatastoreType.OPERATIONAL),
+                eq(portPath),
+                any(FlowCapableNodeConnectorStatistics.class));
     }
 
     @Test
@@ -373,9 +373,9 @@ public class StatisticsGatheringUtilsTest {
                 .augmentation(FlowTableStatisticsData.class)
                 .child(FlowTableStatistics.class);
         verify(deviceContext).writeToTransaction(
-                Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.eq(tablePath),
-                Matchers.any(FlowTableStatistics.class));
+                eq(LogicalDatastoreType.OPERATIONAL),
+                eq(tablePath),
+                any(FlowTableStatistics.class));
     }
 
     @Test
@@ -408,9 +408,9 @@ public class StatisticsGatheringUtilsTest {
                 .augmentation(FlowCapableNodeConnector.class)
                 .child(Queue.class, new QueueKey(new QueueId(queueIdValue)));
         verify(deviceContext).writeToTransaction(
-                Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                Matchers.eq(queuePath),
-                Matchers.any(Queue.class));
+                eq(LogicalDatastoreType.OPERATIONAL),
+                eq(queuePath),
+                any(Queue.class));
     }
 
     @Test
@@ -459,13 +459,13 @@ public class StatisticsGatheringUtilsTest {
                 .child(Table.class, new TableKey((short) 0));
         final KeyedInstanceIdentifier<Flow, FlowKey> flowPath =  tablePath.child(Flow.class, new FlowKey(flowId));
 
-        verify(deviceContext, Mockito.never()).addDeleteToTxChain(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                                  Matchers.<InstanceIdentifier<?>>any());
+        verify(deviceContext, Mockito.never()).addDeleteToTxChain(eq(LogicalDatastoreType.OPERATIONAL),
+                ArgumentMatchers.<InstanceIdentifier<?>>any());
 
         final InOrder inOrder = Mockito.inOrder(deviceContext);
-        inOrder.verify(deviceContext).writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                         Matchers.any(),
-                                                         Matchers.any());
+        inOrder.verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                                                         any(),
+                                                         any());
     }
 
     @Test
@@ -493,16 +493,16 @@ public class StatisticsGatheringUtilsTest {
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId(meterIdValue);
         final KeyedInstanceIdentifier<Meter, MeterKey> meterPath = dummyNodePath.augmentation(FlowCapableNode.class)
                 .child(Meter.class, new MeterKey(meterId));
-        verify(deviceContext, Mockito.never()).addDeleteToTxChain(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                                  Matchers.<InstanceIdentifier<?>>any());
+        verify(deviceContext, Mockito.never()).addDeleteToTxChain(eq(LogicalDatastoreType.OPERATIONAL),
+                ArgumentMatchers.<InstanceIdentifier<?>>any());
         verify(deviceMeterRegistry).store(meterId);
-        verify(deviceContext).writeToTransaction(Matchers.eq(LogicalDatastoreType.OPERATIONAL),
-                                                 Matchers.eq(meterPath), Matchers.any(Meter.class));
+        verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL),
+                                                 eq(meterPath), any(Meter.class));
     }
 
     private void fireAndCheck(final MultipartType type, final List<MultipartReply> statsData)
             throws InterruptedException, ExecutionException, TimeoutException {
-        when(statisticsService.getStatisticsOfType(Matchers.any(EventIdentifier.class), Matchers.eq(type)))
+        when(statisticsService.getStatisticsOfType(any(EventIdentifier.class),eq(type)))
                 .thenReturn(Futures.immediateFuture(RpcResultBuilder.success(statsData).build()));
 
         final ListenableFuture<Boolean> gatherStatisticsResult = StatisticsGatheringUtils.gatherStatistics(
@@ -552,8 +552,6 @@ public class StatisticsGatheringUtilsTest {
 
         verify(deviceContext).isTransactionsEnabled();
         verify(deviceContext).getReadTransaction();
-        verify(deviceContext).writeToTransaction(Mockito.eq(LogicalDatastoreType.OPERATIONAL),
-                                                 Mockito.any(),
-                                                 Mockito.any());
+        verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL), any(), any());
     }
 }
index 719e35d2d13631cefcbf9728a3147dfbdcddde25..03a4d44769fb647c6abe33915ab814f95dd3b56e 100644 (file)
@@ -8,13 +8,13 @@
 package org.opendaylight.openflowplugin.impl.statistics;
 
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
 import java.lang.reflect.Field;
-import java.math.BigInteger;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;
@@ -23,7 +23,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -32,7 +32,6 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue;
-import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
@@ -42,7 +41,6 @@ import org.opendaylight.openflowplugin.api.openflow.device.handlers.MultiMsgColl
 import org.opendaylight.openflowplugin.api.openflow.lifecycle.ReconciliationFrameworkRegistrar;
 import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsContext;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
-import org.opendaylight.openflowplugin.impl.registry.flow.DeviceFlowRegistryImpl;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
@@ -110,37 +108,9 @@ public class StatisticsManagerImplTest {
                 .create(Nodes.class)
                 .child(Node.class, new NodeKey(new NodeId("openflow:10")));
 
-        when(mockedPrimConnectionContext.getFeatures()).thenReturn(mockedFeatures);
-        when(mockedPrimConnectionContext.getConnectionAdapter()).thenReturn(mockedConnectionAdapter);
-        when(mockedPrimConnectionContext.getConnectionState()).thenReturn(ConnectionContext.CONNECTION_STATE.WORKING);
-        when(mockedPrimConnectionContext.getNodeId()).thenReturn(NODE_ID);
-        when(mockedPrimConnectionContext.getOutboundQueueProvider()).thenReturn(outboundQueue);
-
-        when(mockedDeviceState.isFlowStatisticsAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceState.isGroupAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceState.isMetersAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceState.isPortStatisticsAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceState.isQueueStatisticsAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceState.isTableStatisticsAvailable()).thenReturn(Boolean.TRUE);
-        when(mockedDeviceInfo.getNodeInstanceIdentifier()).thenReturn(nodePath);
-        when(mockedDeviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
-        when(mockedDeviceInfo.getNodeId()).thenReturn(NODE_ID);
-
-        when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
-        when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedPrimConnectionContext);
-        when(mockedDeviceContext.getMessageSpy()).thenReturn(mockedMessagSpy);
-        when(mockedDeviceContext.getDeviceFlowRegistry())
-            .thenReturn(new DeviceFlowRegistryImpl(OFConstants.OFP_VERSION_1_3, dataBroker, nodePath));
-        when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
-        when(mockedDeviceContext.getMultiMsgCollector(
-            Matchers.<RequestContext<List<MultipartReply>>>any())).thenAnswer(
-                invocation -> {
-                    currentRequestContext = (RequestContext<List<MultipartReply>>) invocation.getArguments()[0];
-                    return multiMagCollector;
-                });
         when(rpcProviderRegistry.addRpcImplementation(
-                Matchers.eq(StatisticsManagerControlService.class),
-                Matchers.<StatisticsManagerControlService>any())).thenReturn(serviceControlRegistration);
+                eq(StatisticsManagerControlService.class),
+                ArgumentMatchers.<StatisticsManagerControlService>any())).thenReturn(serviceControlRegistration);
 
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
         final long basicTimerDelay = 3000L;
index 4baa7c6009ab606dfe68c9da7d6b15b9f0a067c7..c021c7cf94b3adede9ae759d6d63bcceb59f3354 100644 (file)
@@ -8,13 +8,11 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.stubbing.Answer;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
-import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
 import org.opendaylight.openflowplugin.impl.rpc.AbstractRequestContext;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
@@ -44,7 +42,5 @@ public abstract class AbstractSingleStatsServiceTest extends AbstractStatsServic
 
         Mockito.when(rqContextStack.<Object>createRequestContext()).thenReturn(rqContext);
         Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(null);
-        Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector)
-                .endCollecting(Matchers.any(EventIdentifier.class));
     }
 }
index 0fbd162ed38efdfd64e2247001ffdfeeaca87514..66f59b01931e664a0f4d856510111f2044d1ec8b 100644 (file)
@@ -8,11 +8,12 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import com.google.common.util.concurrent.FutureCallback;
 import java.math.BigInteger;
 import org.junit.Before;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -77,21 +78,21 @@ public abstract class AbstractStatsServiceTest {
 
     @Before
     public void init() throws Exception {
-        Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
+        Mockito.lenient().when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
         Mockito.when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
-        Mockito.when(deviceContext.getMultiMsgCollector(Matchers.any(RequestContext.class)))
+        Mockito.lenient().when(deviceContext.getMultiMsgCollector(any(RequestContext.class)))
                 .thenReturn(multiMsgCollector);
-        Mockito.when(deviceContext.oook()).thenReturn(translatorLibrary);
-        Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
+        Mockito.lenient().when(deviceContext.oook()).thenReturn(translatorLibrary);
+        Mockito.lenient().when(deviceContext.getDeviceState()).thenReturn(deviceState);
         Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
-        Mockito.when(deviceInfo.getNodeId()).thenReturn(NODE_ID);
-        Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
-        Mockito.when(deviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
-        Mockito.when(connectionContext.getFeatures()).thenReturn(features);
-        Mockito.when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
-        Mockito.when(features.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
-        Mockito.when(getFeaturesOutput.getDatapathId()).thenReturn(BigInteger.valueOf(123L));
-        Mockito.when(getFeaturesOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(deviceInfo.getNodeId()).thenReturn(NODE_ID);
+        Mockito.lenient().when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(deviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
+        Mockito.lenient().when(connectionContext.getFeatures()).thenReturn(features);
+        Mockito.lenient().when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
+        Mockito.lenient().when(features.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(getFeaturesOutput.getDatapathId()).thenReturn(BigInteger.valueOf(123L));
+        Mockito.lenient().when(getFeaturesOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
 
         setUp();
     }
index 39e9cccab8545c05af14f22da2d75613f837fb24..4f9abf088bf3206860c47adfb007a18eeafbe743 100644 (file)
@@ -12,7 +12,6 @@ import java.util.concurrent.Future;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
-import org.mockito.Mockito;
 import org.opendaylight.openflowplugin.impl.rpc.AbstractRequestContext;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
@@ -46,7 +45,7 @@ public class OpendaylightFlowStatisticsServiceImpl1Test extends AbstractStatsSer
                 //NOOP
             }
         };
-        Mockito.when(rqContextStack.<Object>createRequestContext()).thenReturn(rqContext);
+        //Mockito.when(rqContextStack.<Object>createRequestContext()).thenReturn(rqContext);
     }
 
     @Test(expected = IllegalAccessError.class)
index 4e0425fac0fdf66702e1da7818108accd79d03c3..758e0f668cf47c4275e386c4facf3453ddc69862 100644 (file)
@@ -8,6 +8,10 @@
 
 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;
@@ -16,7 +20,6 @@ import org.junit.Assert;
 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;
@@ -67,14 +70,14 @@ public class OpendaylightFlowStatisticsServiceImpl2Test extends AbstractStatsSer
         };
         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);
@@ -83,9 +86,9 @@ public class OpendaylightFlowStatisticsServiceImpl2Test extends AbstractStatsSer
                     .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 =
index 339bdbf76a60932c3c6bec77c17ccccddb15daed..41df3a69749331b6d939f54f912c1c93451115a2 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+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;
@@ -16,8 +19,8 @@ import java.util.concurrent.atomic.AtomicLong;
 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.Mockito;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
@@ -54,7 +57,7 @@ public class OpendaylightFlowTableStatisticsServiceImplTest extends AbstractSing
     @Test
     public void testGetFlowTablesStatistics() throws Exception {
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
 
         GetFlowTablesStatisticsInputBuilder input = new GetFlowTablesStatisticsInputBuilder()
                 .setNode(createNodeRef("unitProt:123"));
@@ -87,7 +90,7 @@ public class OpendaylightFlowTableStatisticsServiceImplTest extends AbstractSing
         Assert.assertTrue(rpcResult.isSuccessful());
         Assert.assertEquals(MultipartType.OFPMPTABLE, requestInput.getValue().getType());
 
-        Mockito.verify(notificationPublishService).offerNotification(Matchers.<Notification>any());
+        Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.<Notification>any());
     }
 
     @Test
index 14c27461dc5e4c7ad19ab42d472a99e39428832a..c0a013b59b2d384ad1837ec15e81461ae6b94a2d 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+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;
@@ -17,8 +20,8 @@ import org.junit.After;
 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.Mockito;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
@@ -73,12 +76,12 @@ public class OpendaylightGroupStatisticsServiceImplTest extends AbstractSingleSt
                 new AtomicLong(), notificationPublishService, convertorManager);
 
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
     }
 
     @After
     public void tearDown() throws Exception {
-        Mockito.verify(notificationPublishService).offerNotification(Matchers.<Notification>any());
+        Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.<Notification>any());
     }
 
     @Test
index 6c7be87d08344e956b84aaa687cc2786c6913da9..41eeb1fd1b3bd5d15cd9e6e66e53cd5315164b5b 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+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;
@@ -17,8 +20,8 @@ import org.junit.After;
 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.Mockito;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
@@ -73,12 +76,12 @@ public class OpendaylightMeterStatisticsServiceImplTest extends AbstractSingleSt
                 new AtomicLong(), notificationPublishService, convertorManager);
 
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
     }
 
     @After
     public void tearDown() throws Exception {
-        Mockito.verify(notificationPublishService).offerNotification(Matchers.<Notification>any());
+        Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.<Notification>any());
     }
 
     @Test
index f305799a09f0453fb3efec3cccac0d834d50acf2..5a42f0025b051f1a5dd3906c4ce2f0eaa51cc6f2 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+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;
@@ -17,8 +20,8 @@ import org.junit.After;
 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.Mockito;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
@@ -51,12 +54,12 @@ public class OpendaylightPortStatisticsServiceImplTest extends AbstractSingleSta
                 new AtomicLong(), notificationPublishService);
 
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
     }
 
     @After
     public void tearDown() throws Exception {
-        Mockito.verify(notificationPublishService).offerNotification(Matchers.<Notification>any());
+        Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.<Notification>any());
     }
 
     @Test
index ab35849fb927807e1d510c14696692b3910515f5..ed5a55a3b6aeaddbb8ab4b43f6e210cd336579be 100644 (file)
@@ -8,6 +8,9 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services;
 
+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;
@@ -17,8 +20,8 @@ import org.junit.After;
 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.Mockito;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.queue.rev130925.QueueId;
@@ -56,13 +59,13 @@ public class OpendaylightQueueStatisticsServiceImplTest extends AbstractSingleSt
 
     @After
     public void tearDown() throws Exception {
-        Mockito.verify(notificationPublishService).offerNotification(Matchers.<Notification>any());
+        Mockito.verify(notificationPublishService).offerNotification(ArgumentMatchers.<Notification>any());
     }
 
     @Test
     public void testGetAllQueuesStatisticsFromAllPorts() throws Exception {
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
 
         GetAllQueuesStatisticsFromAllPortsInputBuilder input = new GetAllQueuesStatisticsFromAllPortsInputBuilder()
                 .setNode(createNodeRef("unitProt:123"));
@@ -102,7 +105,7 @@ public class OpendaylightQueueStatisticsServiceImplTest extends AbstractSingleSt
     @Test
     public void testGetAllQueuesStatisticsFromGivenPort() throws Exception {
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
 
         GetAllQueuesStatisticsFromGivenPortInputBuilder input = new GetAllQueuesStatisticsFromGivenPortInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
@@ -122,7 +125,7 @@ public class OpendaylightQueueStatisticsServiceImplTest extends AbstractSingleSt
     @Test
     public void testGetQueueStatisticsFromGivenPort() throws Exception {
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
 
         GetQueueStatisticsFromGivenPortInputBuilder input = new GetQueueStatisticsFromGivenPortInputBuilder()
                 .setNode(createNodeRef("unitProt:123"))
index 8d6092cdc6ea816c7b9edee32b250fcc21bbe67b..16d7f35aa1a9598d961013fbf99be192efe49219 100644 (file)
@@ -8,6 +8,9 @@
 
 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 com.google.common.util.concurrent.ListenableFuture;
 import java.math.BigInteger;
@@ -17,7 +20,6 @@ import org.junit.Assert;
 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;
@@ -91,20 +93,20 @@ public class AbstractCompatibleStatServiceTest extends AbstractStatsServiceTest
             return null;
         };
 
-        Mockito.when(featuresOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
+        Mockito.lenient().when(featuresOutput.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
         Mockito.when(rqContextStack.<Object>createRequestContext()).thenReturn(rqContext);
-        Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
+        Mockito.lenient().when(deviceContext.getDeviceState()).thenReturn(deviceState);
         Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         Mockito.when(deviceInfo.getNodeId()).thenReturn(NODE_ID);
         Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
         Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector).endCollecting(null);
-        Mockito.doAnswer(closeRequestFutureAnswer).when(multiMsgCollector)
-                .endCollecting(Matchers.any(EventIdentifier.class));
+        Mockito.lenient().doAnswer(closeRequestFutureAnswer).when(multiMsgCollector)
+                .endCollecting(any(EventIdentifier.class));
 
         Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider)
-                .commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
+                .commitEntry(eq(42L), requestInput.capture(), any(FutureCallback.class));
 
-        Mockito.when(translatorLibrary.lookupTranslator(Matchers.any(TranslatorKey.class))).thenReturn(translator);
+        Mockito.when(translatorLibrary.lookupTranslator(any(TranslatorKey.class))).thenReturn(translator);
 
         service = AggregateFlowsInTableService.createWithOook(rqContextStack, deviceContext, new AtomicLong(20L));
     }
@@ -140,7 +142,7 @@ public class AbstractCompatibleStatServiceTest extends AbstractStatsServiceTest
                 .setFlowCount(new Counter32(12L))
                 .setPacketCount(new Counter64(BigInteger.valueOf(13L)))
                 .build();
-        Mockito.when(translator.translate(Matchers.any(MultipartReply.class), Matchers.eq(deviceInfo), Matchers.any()))
+        Mockito.when(translator.translate(any(MultipartReply.class), eq(deviceInfo), any()))
                 .thenReturn(aggregatedStats);
 
 
@@ -152,6 +154,6 @@ public class AbstractCompatibleStatServiceTest extends AbstractStatsServiceTest
         Assert.assertTrue(result.isSuccessful());
         Assert.assertEquals(MultipartType.OFPMPAGGREGATE, requestInput.getValue().getType());
         Mockito.verify(notificationPublishService, Mockito.timeout(500))
-                .offerNotification(Matchers.any(AggregateFlowStatisticsUpdate.class));
+                .offerNotification(any(AggregateFlowStatisticsUpdate.class));
     }
 }
index c26b9d060c06eaa54e5a0fc03356a660317d34c3..aa8bf5526daf09e992e62521c16ef4e3504be994 100644 (file)
@@ -8,6 +8,9 @@
 
 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;
@@ -16,8 +19,8 @@ import java.util.concurrent.atomic.AtomicLong;
 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;
@@ -83,8 +86,8 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
                 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)
@@ -99,7 +102,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
                 .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)))
@@ -130,7 +133,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
         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
@@ -150,7 +153,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
         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() {
@@ -213,7 +216,7 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
         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
@@ -235,6 +238,6 @@ public class OpendaylightFlowStatisticsServiceDelegateImplTest extends AbstractS
         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));
     }
 }
index 10f42edfa8e85a8447a3a3a981700c2486bd1c9c..ab50f4030cc73b5a082b71723f47a88bcc92f5c5 100644 (file)
@@ -40,7 +40,6 @@ public class StatisticsGatheringOnTheFlyServiceTest extends ServiceMocking {
                                                          convertorManager,
                                                          MultipartWriterProviderFactory
                                                                  .createDefaultProvider(mockedDeviceContext));
-        Mockito.doReturn(NODE_ID).when(mockedPrimConnectionContext).getNodeId();
         Mockito.when(mockedDeviceInfo.getNodeId()).thenReturn(NODE_ID);
         Mockito.when(mockedDeviceContext.getDeviceInfo().getNodeId()).thenReturn(NODE_ID);
     }
index 44081aabebb82c754df2570f1d44f3a8f2c5ee5c..1df959a2cc3e30427da82e1ef3104b02b6de9a34 100755 (executable)
@@ -8,7 +8,8 @@
 
 package org.opendaylight.openflowplugin.impl.statistics.services.direct;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.when;
 
 import java.math.BigInteger;
@@ -105,25 +106,25 @@ public abstract class AbstractDirectStatisticsServiceTest {
                 .child(Node.class, new NodeKey(new NodeId(NODE_ID)));
 
         convertorManager = ConvertorManagerFactory.createDefaultManager();
-        when(deviceContext.getDeviceFlowRegistry()).thenReturn(deviceFlowRegistry);
-        when(deviceContext.getDeviceGroupRegistry()).thenReturn(deviceGroupRegistry);
-        when(deviceContext.getDeviceMeterRegistry()).thenReturn(deviceMeterRegistry);
+        lenient().when(deviceContext.getDeviceFlowRegistry()).thenReturn(deviceFlowRegistry);
+        lenient().when(deviceContext.getDeviceGroupRegistry()).thenReturn(deviceGroupRegistry);
+        lenient().when(deviceContext.getDeviceMeterRegistry()).thenReturn(deviceMeterRegistry);
         when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
         when(deviceContext.getMessageSpy()).thenReturn(messageSpy);
-        when(deviceContext.getMultiMsgCollector(any())).thenReturn(multiMsgCollector);
-        when(deviceContext.oook()).thenReturn(translatorLibrary);
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
+        lenient().when(deviceContext.getMultiMsgCollector(any())).thenReturn(multiMsgCollector);
+        lenient().when(deviceContext.oook()).thenReturn(translatorLibrary);
+        lenient().when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeInstanceIdentifier);
-        when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID));
+        lenient().when(deviceInfo.getNodeId()).thenReturn(new NodeId(NODE_ID));
         when(deviceInfo.getVersion()).thenReturn(OF_VERSION);
         when(deviceInfo.getDatapathId()).thenReturn(DATAPATH_ID);
-        when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION);
-        when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);
+        lenient().when(getFeaturesOutput.getVersion()).thenReturn(OF_VERSION);
+        lenient().when(getFeaturesOutput.getDatapathId()).thenReturn(DATAPATH_ID);
         when(connectionContext.getFeatures()).thenReturn(features);
-        when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
-        when(features.getVersion()).thenReturn(OF_VERSION);
-        when(features.getDatapathId()).thenReturn(DATAPATH_ID);
+        lenient().when(connectionContext.getOutboundQueueProvider()).thenReturn(outboundQueueProvider);
+        lenient().when(features.getVersion()).thenReturn(OF_VERSION);
+        lenient().when(features.getDatapathId()).thenReturn(DATAPATH_ID);
         multipartWriterProvider = MultipartWriterProviderFactory.createDefaultProvider(deviceContext);
         setUp();
     }
index 6f598f8737912d8828f4974b44a108873221cbec..d763332497ef9c92b398c9bcca47dfcd9e9530b1 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.multilay
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -60,7 +60,6 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
     public void testBuildRequestBody() throws Exception {
         final GetFlowStatisticsInput input = mock(GetFlowStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getTableId()).thenReturn(TABLE_NO);
 
         final MultipartRequestFlowCase body = (MultipartRequestFlowCase) ((MultipartRequestInput) service
index be0ea42658a5ea45730590bf1045efe257f4a6dd..8358a7a65800fe2ba650f466038f1759309e3449 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.multilay
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -51,7 +52,7 @@ public class GroupDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetGroupStatisticsInput input = mock(GetGroupStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getGroupId()).thenReturn(new GroupId(GROUP_NO));
 
         final MultipartRequestGroupCase body = (MultipartRequestGroupCase) ((MultipartRequestInput) service
index 3f79b2140520d9984e31d8ca74f4494a96ba3ccc..8cc436ae05d3bf56349f0463085ec55cc229f283 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.multilay
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -49,7 +49,6 @@ public class MeterDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetMeterStatisticsInput input = mock(GetMeterStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getMeterId()).thenReturn(new MeterId(METER_NO));
 
         final MultipartRequestMeterCase body = (MultipartRequestMeterCase) ((MultipartRequestInput) service
index 821299ce1ecfb3224c18ad4e02a741105f878771..e17fe48437cc21f22470eee459a93f1343efe41b 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.multilay
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -49,7 +50,7 @@ public class NodeConnectorDirectStatisticsServiceTest extends AbstractDirectStat
     public void testBuildRequestBody() throws Exception {
         final GetNodeConnectorStatisticsInput input = mock(GetNodeConnectorStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getNodeConnectorId()).thenReturn(nodeConnectorId);
 
         final MultipartRequestPortStatsCase body = (MultipartRequestPortStatsCase) ((MultipartRequestInput)service
index e57f79408353772ed2138f28394241fde4d12e55..45706f117570aae4964ae6e09470833221e81031 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.multilay
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -53,7 +54,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetQueueStatisticsInput input = mock(GetQueueStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
         when(input.getNodeConnectorId()).thenReturn(new NodeConnectorId(NODE_ID + ":" + PORT_NO));
 
index 3276a81b4c6dff5d61f3e4e8051bacbd22e38b9c..95759a287c1af099badbf5d65137f54668bf999c 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlela
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -61,7 +61,6 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
     public void testBuildRequestBody() throws Exception {
         final GetFlowStatisticsInput input = mock(GetFlowStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getTableId()).thenReturn(TABLE_NO);
 
         final MultipartRequestFlowStats body = (MultipartRequestFlowStats) ((MultipartRequest) service
index 455bdd1d33a1541b35d7decf01fdd41e65c70b3b..55f29132a8d17d1180ebc869bdf9b401380fb8c8 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlela
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -49,7 +50,7 @@ public class GroupDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetGroupStatisticsInput input = mock(GetGroupStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getGroupId()).thenReturn(new GroupId(GROUP_NO));
 
         final MultipartRequestGroupStats body = (MultipartRequestGroupStats) ((MultipartRequest) service
index 7e0c9fd47671c4a933b84738c64349798376c75b..6b5b5dbfffafddcb71b1bcd883cc1a088660102b 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlela
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -54,7 +55,7 @@ public class MeterDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetMeterStatisticsInput input = mock(GetMeterStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getMeterId()).thenReturn(new MeterId(METER_NO));
 
         final MultipartRequestMeterStats body = (MultipartRequestMeterStats) ((MultipartRequest) service
index dfe8880c99500d5c2afd9c878054ed6c5952bd7d..b7fe1136f461c4b36e91e46d48a3d97906ad7ec8 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlela
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -47,7 +48,7 @@ public class NodeConnectorDirectStatisticsServiceTest extends AbstractDirectStat
     public void testBuildRequestBody() throws Exception {
         final GetNodeConnectorStatisticsInput input = mock(GetNodeConnectorStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getNodeConnectorId()).thenReturn(nodeConnectorId);
 
         final MultipartRequestPortStats body = (MultipartRequestPortStats) ((MultipartRequest)service
index d7096494407dd154bcb28248c53d60796d4bdcd9..f53dd84dd0d54a5ff5c50c9a1057ab437bb4089e 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlela
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -53,7 +54,7 @@ public class QueueDirectStatisticsServiceTest extends AbstractDirectStatisticsSe
     public void testBuildRequestBody() throws Exception {
         final GetQueueStatisticsInput input = mock(GetQueueStatisticsInput.class);
 
-        when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
+        lenient().when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
         when(input.getQueueId()).thenReturn(new QueueId(QUEUE_NO));
         when(input.getNodeConnectorId()).thenReturn(nodeConnectorId);
 
index dd26d67dc2121d3c93204bdd8d4ab2a77a49124c..fec15b653a420ebbeb5e329021c75e67c69ad07f 100644 (file)
@@ -73,9 +73,7 @@ public class FlowRemovedTranslatorTest {
         translator = new FlowRemovedTranslator(convertorManager);
         translatorV10 = new FlowRemovedV10Translator(convertorManager);
 
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeId);
-        when(features.getDatapathId()).thenReturn(BigInteger.TEN);
     }
 
     @Test
index 53c372d1275912560e7986e33daead6f1ea6ff4f..225ffb12cfb1a7271f980cb83a1e43ebc5292fae 100644 (file)
@@ -29,7 +29,6 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorM
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
@@ -83,15 +82,7 @@ public class PacketReceivedTranslatorTest {
         final List<PhyPort> phyPorts = Collections.singletonList(phyPort);
         convertorManager = ConvertorManagerFactory.createDefaultManager();
 
-        Mockito.when(deviceContext.getPrimaryConnectionContext()).thenReturn(connectionContext);
-        Mockito.when(connectionContext.getFeatures()).thenReturn(featuresReply);
-        Mockito.when(featuresReply.getDatapathId()).thenReturn(BigInteger.TEN);
-        Mockito.when(deviceContext.getDeviceState()).thenReturn(deviceState);
-        Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_3);
         Mockito.when(deviceInfo.getDatapathId()).thenReturn(BigInteger.TEN);
-        Mockito.when(getFeaturesOutput.getDatapathId()).thenReturn(BigInteger.TEN);
-        Mockito.when(getFeaturesOutput.getPhyPort()).thenReturn(phyPorts);
-        Mockito.when(phyPort.getPortNo()).thenReturn(PORT_NO_DS);
     }
 
     @Test
@@ -101,7 +92,6 @@ public class PacketReceivedTranslatorTest {
                 .child(Node.class, new NodeKey(new NodeId("openflow:10")));
         final PacketReceivedTranslator packetReceivedTranslator = new PacketReceivedTranslator(convertorManager);
         final PacketInMessage packetInMessage = createPacketInMessage(DATA.getBytes(), PORT_NO);
-        Mockito.when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodePath);
 
         final PacketReceived packetReceived = packetReceivedTranslator.translate(packetInMessage, deviceInfo, null);
 
@@ -109,8 +99,7 @@ public class PacketReceivedTranslatorTest {
         Assert.assertEquals("org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.SendToController",
                 packetReceived.getPacketInReason().getName());
         Assert.assertEquals("openflow:10:" + PORT_NO,
-                packetReceived.getIngress().getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class)
-                        .getId().getValue());
+                packetReceived.getIngress().getValue().firstKeyOf(NodeConnector.class).getId().getValue());
         Assert.assertEquals(0L, packetReceived.getFlowCookie().getValue().longValue());
         Assert.assertEquals(42L, packetReceived.getTableId().getValue().longValue());
     }
index 4e3a449fe2f4fcf73203740c48907fa9646f66c8..6c82e6dc57080c2c7210d0b1305d1d3eee8df98f 100644 (file)
@@ -48,7 +48,6 @@ public class PortUpdateTranslatorTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(deviceContext.getDeviceInfo()).thenReturn(deviceInfo);
         portUpdateTranslator = new PortUpdateTranslator();
 
         portStateBld = new StateBuilder().setLive(true);
index e3880f4441ffcf1c1ddde136a6f3453af0e2e39e..4a366ce0f88fd02a7cb9f2b1fd1240f3cb6afa10 100644 (file)
@@ -17,8 +17,8 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 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.mockito.runners.MockitoJUnitRunner;
@@ -53,7 +53,7 @@ public class BarrierUtilTest {
 
     @Before
     public void setUp() throws Exception {
-        Mockito.when(transactionService.sendBarrier(Matchers.<SendBarrierInput>any()))
+        Mockito.when(transactionService.sendBarrier(ArgumentMatchers.<SendBarrierInput>any()))
                 .thenReturn(RpcResultBuilder.<SendBarrierOutput>success().buildFuture());
     }
 
@@ -69,7 +69,7 @@ public class BarrierUtilTest {
         final ListenableFuture<RpcResult<String>> chainResult =
                 BarrierUtil.chainBarrier(input, NODE_REF, transactionService, compositeTransform);
 
-        Mockito.verify(transactionService).sendBarrier(Matchers.<SendBarrierInput>any());
+        Mockito.verify(transactionService).sendBarrier(ArgumentMatchers.<SendBarrierInput>any());
         Mockito.verify(compositeTransform).apply(pairCpt.capture());
 
         final Pair<RpcResult<String>, RpcResult<SendBarrierOutput>> value = pairCpt.getValue();
index c32b49d191317e0d41a1dd8ecb1c1836279ba3ea..75adf0cfad6746b645d911b3e01c475866521bc2 100644 (file)
@@ -9,8 +9,8 @@
 package org.opendaylight.openflowplugin.impl.util;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
index acfee6858c1b5af2d8a6d758be3e8a52fd6cd7f8..94643b753b05a8ea6374d3f8d00750ccac130380 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.util;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -17,7 +17,6 @@ import java.math.BigInteger;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
@@ -68,10 +67,8 @@ public class MdSalRegistrationUtilsTest {
     @Before
     public void setUp() throws Exception {
         convertorManager = ConvertorManagerFactory.createDefaultManager();
-        when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
         when(mockedDeviceContext.getDeviceInfo()).thenReturn(mockedDeviceInfo);
         when(mockedConnectionContext.getFeatures()).thenReturn(mockedFeatures);
-        when(mockedFeatures.getDatapathId()).thenReturn(mockedDataPathId);
         when(mockedDeviceInfo.getDatapathId()).thenReturn(mockedDataPathId);
         when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedConnectionContext);
     }
@@ -83,7 +80,7 @@ public class MdSalRegistrationUtilsTest {
                                                 extensionConverterProvider,
                                                 convertorManager);
         verify(mockedRpcContext, times(NUMBER_OF_RPC_SERVICE_REGISTRATION)).registerRpcServiceImplementation(
-                Matchers.any(), any(RpcService.class));
+                any(), any(RpcService.class));
     }
 
     @Test
@@ -98,7 +95,7 @@ public class MdSalRegistrationUtilsTest {
                                                                  notificationPublishService,
                                                                  convertorManager);
         verify(mockedRpcContext, times(NUMBER_OF_STAT_COMPAT_RPC_SERVICE_REGISTRATION))
-                .registerRpcServiceImplementation(Matchers.any(), any(RpcService.class));
+                .registerRpcServiceImplementation(any(), any(RpcService.class));
     }
 
 }
\ No newline at end of file
index 4f34a618e1165506b97b74875111e4a70bb74549..2afadcacf8c0aa31b87f6b97d11dfb832aa9a08e 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
@@ -53,7 +54,7 @@
                                         </goals>
                                     </pluginExecutionFilter>
                                     <action>
-                                        <ignore />
+                                        <ignore/>
                                     </action>
                                 </pluginExecution>
                             </pluginExecutions>
index 71a61f0ce266d74b6d8afea371fe29dfde09285d..8f78142c2def5e2b1cc9bbeb6d4c804e6f0156f5 100644 (file)
 
     </dependencies>
 </project>
-
index b3e68b4dbf4a52dd453ddab465ee17ec50e5ef67..d6d6460660a8ac32a0c6b73186787377cf17e8d6 100644 (file)
@@ -186,7 +186,7 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
             getBandsFromSAL(source.getMeterBandHeaders(), bands);
             meterModInputBuilder.setBands(bands);
         } else {
-            LOG.error("For this meter Id" + source.getMeterId().getValue() + ",no associated band data found!");
+            LOG.error("For this meter Id {}, no associated band data found!", source.getMeterId().getValue());
         }
 
         meterModInputBuilder.setVersion(data.getVersion());
index da739a6784dec014d1477addaff3006f07054400..fe3f4c481f7f755d9f5152a50317013e2e53e801 100644 (file)
@@ -440,7 +440,7 @@ public class TableFeaturesResponseConvertor
             if (actionExecutor != null) {
                 actionExecutor.execute(property, propBuilder);
             } else {
-                LOG.error("Unsupported table feature property : " + propType);
+                LOG.error("Unsupported table feature property : {}", propType);
             }
 
             propBuilder.setOrder(index);
index c91fe9c201d4070dc8b5f565bd33bd4b624e6411..8f9d620126d2b2d0b5978eeb6c80e6cbe1e35e6c 100644 (file)
@@ -123,7 +123,7 @@ public final class ActionResponseConvertor extends Convertor<
                 if (convertedAction.isPresent()) {
                     result.add(convertedAction.get());
                 } else {
-                    /**
+                    /*
                      * TODO: EXTENSION PROPOSAL (action, OFJava to MD-SAL)
                      * - we might also need a way on how to identify exact type of augmentation to be
                      *   used as match can be bound to multiple models
index 23a1ccea37a3d78ee0a2e939b41379359fbdbd6f..472990d71676411d360ca3bfd37d06b2bf402189 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.openflow.md.core.extension;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.when;
 
 import org.junit.Before;
index 05c5e9d0ac3f370932182b218079e66874495095..991fe8f101c167b5a606238cdbb17ecca32bc8fc 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.14.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <relativePath/>
     </parent>
 
index a28fe782d5b80ff28a60c90c3d7805a703f54fbf..b97c466399bae8104a8792b81bc78da557f3515f 100644 (file)
@@ -52,4 +52,3 @@
         </dependency>
     </dependencies>
 </project>
-
index f770f214ef6b1b25d2bcc4687815fe9a63297a1b..d799e8fe9beddb21023c21e83054b1d2719e64cd 100644 (file)
@@ -34,7 +34,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatch;
@@ -67,7 +66,7 @@ public final class FlowUtils {
         MatchBuilder match = new MatchBuilder();
         match.setEthernetMatch(ethernetMatch);
 
-        Uri outputPort = dstPort.getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId();
+        Uri outputPort = dstPort.getValue().firstKeyOf(NodeConnector.class).getId();
 
         Action outputToControllerAction = new ActionBuilder()
                 .setOrder(0)
index fa3b3f2d9342481ae324332b1b280671d57f7431..2acc10228bb86ec5e5fe00717d376d1bdea7bfb1 100644 (file)
@@ -77,14 +77,14 @@ public final class InstanceIdentifierUtils {
      * @param tablePath the table path
      */
     public static Short getTableId(final InstanceIdentifier<Table> tablePath) {
-        return tablePath.firstKeyOf(Table.class, TableKey.class).getId();
+        return tablePath.firstKeyOf(Table.class).getId();
     }
 
     /**
      * Extracts NodeConnectorKey from node connector path.
      */
     public static NodeConnectorKey getNodeConnectorKey(final InstanceIdentifier<?> nodeConnectorPath) {
-        return nodeConnectorPath.firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
+        return nodeConnectorPath.firstKeyOf(NodeConnector.class);
     }
 
     public static InstanceIdentifier<NodeConnector> createNodeConnectorPath(final InstanceIdentifier<Node> nodeKey,
index d1a0b9be0ad08c26cca16637906dc30cf75fd407..a7d86b9300b2b28c81c2f0d1eae630b881567936 100644 (file)
@@ -96,7 +96,7 @@ public class LearningSwitchHandlerSimpleImpl implements LearningSwitchHandler, P
 
         tablePath = appearedTablePath;
         nodePath = tablePath.firstIdentifierOf(Node.class);
-        nodeId = nodePath.firstKeyOf(Node.class, NodeKey.class).getId();
+        nodeId = nodePath.firstKeyOf(Node.class).getId();
         mac2portMapping = new HashMap<>();
 
         // start forwarding all packages to controller
@@ -181,7 +181,7 @@ public class LearningSwitchHandlerSimpleImpl implements LearningSwitchHandler, P
             String macPath = srcMac.toString() + dstMac.toString();
             if (!coveredMacPaths.contains(macPath)) {
                 LOG.debug("covering mac path: {} by [{}]", macPath,
-                        destNodeConnector.getValue().firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId());
+                        destNodeConnector.getValue().firstKeyOf(NodeConnector.class).getId());
 
                 coveredMacPaths.add(macPath);
                 FlowId flowId = new FlowId(String.valueOf(flowIdInc.getAndIncrement()));
@@ -211,7 +211,7 @@ public class LearningSwitchHandlerSimpleImpl implements LearningSwitchHandler, P
     }
 
     private NodeConnectorId nodeConnectorId(String connectorId) {
-        NodeKey nodeKey = nodePath.firstKeyOf(Node.class, NodeKey.class);
+        NodeKey nodeKey = nodePath.firstKeyOf(Node.class);
         StringBuilder stringId = new StringBuilder(nodeKey.getId().getValue()).append(":").append(connectorId);
         return new NodeConnectorId(stringId.toString());
     }
index 0c516766625d1eeba82697289449da4fc9711119..8e1da375b5c4c9d9e6c99c2640e84649a425b028 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
index a41fa2425e2e5e7b6953ba53111b764ab0c7c8ec..23db039407c8017f32e3f28070d073273d14ecd8 100644 (file)
@@ -6,7 +6,6 @@
   ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
   ~ and is available at http://www.eclipse.org/legal/epl-v10.html
   -->
-
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
@@ -71,4 +70,3 @@
         </dependency>
     </dependencies>
 </project>
-
index b40a328d412715f6debefc1716d73c82efa2cbca..fa1232b82e218426807ba69755f5a4d7f0414574 100644 (file)
@@ -47,4 +47,3 @@
         </dependency>
     </dependencies>
 </project>
-
index fd74a8aba96d2bfb5aa50d9f8d84adb7f5f8aa40..a6747f165de316e653fa2e71478dfc241a95748f 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
index f7d278f8b4d0766286f99343feb3af9a1ccd24f4..836344f558a299720f1fd2e03626efa529a0ff7a 100644 (file)
@@ -100,7 +100,7 @@ public class CallableClient implements Callable<Boolean>, OFClient {
                 }
             }
         } catch (RuntimeException ex) {
-            LOG.error(ex.getMessage(), ex);
+            LOG.error("Error {}", ex);
             return false;
         }
         if (scenarioHandler.isFinishedOK()) {
index d19f655757817e5efa269f2be9334460caad61ca..7eba2f845d52094a7b43ad8deb2e603fe368d424 100644 (file)
@@ -76,7 +76,7 @@ public class ListeningSimpleClient implements OFClient {
                 }
             }
         } catch (InterruptedException ex) {
-            LOG.error(ex.getMessage(), ex);
+            LOG.error("Error {}", ex);
         } finally {
             LOG.debug("listening client shutting down");
             try {
@@ -84,7 +84,7 @@ public class ListeningSimpleClient implements OFClient {
                 bossGroup.shutdownGracefully().get();
                 LOG.debug("listening client shutdown succesful");
             } catch (InterruptedException | ExecutionException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Error {}", e);
             }
         }
         scenarioDone.set(true);
index 14d4538aa90a7ba895a50082f95f1dde2b92ebda..cae78d5d0eb62001e07c6c0dd21f07df8a43303d 100644 (file)
@@ -62,7 +62,7 @@ public class ScenarioHandler extends Thread {
                     WaitForMessageEvent event = (WaitForMessageEvent) peek;
                     event.setHeaderReceived(ofMsg.poll(2000, TimeUnit.MILLISECONDS));
                 } catch (InterruptedException e) {
-                    LOG.error(e.getMessage(), e);
+                    LOG.error("Error {}", e);
                     break;
                 }
             } else if (peek instanceof SendEvent) {
@@ -81,14 +81,14 @@ public class ScenarioHandler extends Thread {
             }
             if (freezeCounter > freeze) {
                 LOG.warn("Scenario frozen: {}", freezeCounter);
-                LOG.warn("Scenario step not finished NOT OK!", freezeCounter);
+                LOG.warn("Scenario step not finished NOT OK! {}", freezeCounter);
                 this.finishedOK = false;
                 break;
             }
             try {
                 sleep(sleepBetweenTries);
             } catch (InterruptedException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Error {}", e);
             }
         }
         LOG.debug("Scenario finished");
index d5885ef62aff0ab433dd7cf535268981ee794cfa..fa4936a3b3e16410fb30380aabbcddb66f6c5d72 100644 (file)
@@ -44,7 +44,7 @@ public class SendEvent implements ClientEvent {
         ctx.writeAndFlush(buffer);
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug(">> {}", ByteBufUtils.bytesToHexString(msgToSend));
+            LOG.debug("Message to send {}", ByteBufUtils.bytesToHexString(msgToSend));
             LOG.debug("message sent");
         }
         return true;
index 8bbcd85a0e667d2cbc1d4f03a5db8c7cac5249eb..3564ea35488b33af7b09e7307813cba7797b539e 100644 (file)
@@ -75,14 +75,14 @@ public class SimpleClient implements OFClient {
                 }
             }
         } catch (InterruptedException ex) {
-            LOG.error(ex.getMessage(), ex);
+            LOG.error("Error {}", ex);
         } finally {
             LOG.debug("shutting down");
             try {
                 group.shutdownGracefully().get();
                 LOG.debug("shutdown succesful");
             } catch (InterruptedException | ExecutionException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Error {}", e);
             }
         }
         scenarioDone.set(true);
index eac94db3d1079df1edb3565e5a4f755af25e09cf..f4ff4298593108af170fd95e612ca4128c51fd27 100644 (file)
@@ -44,7 +44,7 @@ public class SimpleClientHandler extends ChannelInboundHandlerAdapter {
     public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
         ByteBuf bb = (ByteBuf) msg;
         if (LOG.isDebugEnabled()) {
-            LOG.debug("<< {}", ByteBufUtils.byteBufToHexString(bb));
+            LOG.debug("Message {}", ByteBufUtils.byteBufToHexString(bb));
         }
         int length = bb.getUnsignedShort(bb.readerIndex() + LENGTH_INDEX_IN_HEADER);
         LOG.trace("SimpleClientHandler - start of read");
index 9017a5195c2af451a53f0a0de356ce3a1c236da1..55dd0054eeef81d77283f422537c8484fd032e73 100644 (file)
@@ -37,7 +37,7 @@ public class SleepEvent implements ClientEvent {
             LOG.debug("Sleeping");
             return true;
         } catch (InterruptedException e) {
-            LOG.error(e.getMessage(), e);
+            LOG.error("Error {}", e);
         }
         return false;
     }
index d18438f04f2e03d2f856f96a66f731c2cff1e785..4438ba84f9f2e4e29f1e36dbf93150e60f6c670c 100644 (file)
@@ -76,14 +76,14 @@ public class UdpSimpleClient implements OFClient {
                 }
             }
         } catch (InterruptedException ex) {
-            LOG.error(ex.getMessage(), ex);
+            LOG.error("Error {}", ex);
         } finally {
             LOG.debug("shutting down");
             try {
                 group.shutdownGracefully().get();
                 LOG.debug("shutdown succesful");
             } catch (InterruptedException | ExecutionException e) {
-                LOG.error(e.getMessage(), e);
+                LOG.error("Error {}", e);
             }
         }
         scenarioDone.set(true);
index 22c8b7463e164991de5209e378bfb70ed90b6ce9..1ad87aad286e346f8fa049638ecdd9158806a29f 100644 (file)
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.openflowplugin</groupId>
index 8590e6654853dcd85603ee17459b7dd528e5d7a0..3a7da65b0dcea7bcbb924f03a7ddf8369922c79b 100644 (file)
@@ -142,7 +142,7 @@ abstract class AbstractDropTest implements PacketProcessingListener, AutoCloseab
         } catch (RejectedExecutionException e) {
             incrementRunableRejected();
         }
-        LOG.debug("onPacketReceived - Leaving", notification);
+        LOG.debug("onPacketReceived - {} Leaving", notification);
     }
 
     private static final Instructions DROP_INSTRUCTIONS = makeStaticDropActionInstructions();
index d83e6a92634391b5d4fe7291c27d15ec11e348ca..78e4436030ee88bd55879c84c2852ae9f317e7bd 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
index ae2f8d6b3aa1dd15b70a0543fc92cef05b437b45..e6b610e34fbfa6c30a574294ac6fca4724090d0a 100644 (file)
@@ -27,23 +27,20 @@ public class FlowEventListenerLoggingImpl implements SalFlowListener {
 
     @Override
     public void onFlowAdded(FlowAdded notification) {
-        LOG.info("flow to be added.........................." + notification.toString());
-        LOG.info("added flow Xid........................." + notification.getTransactionId().getValue());
-        LOG.info("-----------------------------------------------------------------------------------");
+        LOG.info("flow to be added {}", notification.toString());
+        LOG.info("added flow Xid {}", notification.getTransactionId().getValue());
     }
 
     @Override
     public void onFlowRemoved(FlowRemoved notification) {
-        LOG.debug("removed flow.........................." + notification.toString());
-        LOG.debug("remove flow Xid........................." + notification.getTransactionId().getValue());
-        LOG.debug("-----------------------------------------------------------------------------------");
+        LOG.debug("removed flow {}", notification.toString());
+        LOG.debug("remove flow Xid {}", notification.getTransactionId().getValue());
     }
 
     @Override
     public void onFlowUpdated(FlowUpdated notification) {
-        LOG.debug("updated flow.........................." + notification.toString());
-        LOG.debug("updated flow Xid........................." + notification.getTransactionId().getValue());
-        LOG.debug("-----------------------------------------------------------------------------------");
+        LOG.debug("updated flow {}", notification.toString());
+        LOG.debug("updated flow Xid {}", notification.getTransactionId().getValue());
     }
 
     @Override
@@ -66,8 +63,6 @@ public class FlowEventListenerLoggingImpl implements SalFlowListener {
 
     @Override
     public void onSwitchFlowRemoved(SwitchFlowRemoved notification) {
-        LOG.debug("Switch flow removed : Cookies..................."
-                + notification.getCookie().toString());
-        LOG.debug("-----------------------------------------------------------------------------------");
+        LOG.debug("Switch flow removed : Cookies {}", notification.getCookie().toString());
     }
 }
index 1a70b6abac3610c6637969c61fec80497b5d97fc..1b48eec3807a1127f5dad5b3d71256e7d0239d43 100644 (file)
@@ -40,92 +40,92 @@ public class NodeErrorListenerLoggingImpl implements NodeErrorListener {
 
     @Override
     public void onBadActionErrorNotification(BadActionErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onBadInstructionErrorNotification(BadInstructionErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onBadMatchErrorNotification(BadMatchErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onBadRequestErrorNotification(BadRequestErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onExperimenterErrorNotification(ExperimenterErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onFlowModErrorNotification(FlowModErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onGroupModErrorNotification(GroupModErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onHelloFailedErrorNotification(HelloFailedErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onMeterModErrorNotification(MeterModErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onPortModErrorNotification(PortModErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onQueueOpErrorNotification(QueueOpErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onRoleRequestErrorNotification(RoleRequestErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onSwitchConfigErrorNotification(SwitchConfigErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onTableFeaturesErrorNotification(TableFeaturesErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     @Override
     public void onTableModErrorNotification(TableModErrorNotification notification) {
-        LOG.error("Error notification ----"
-                + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+                notification.getTransactionId().getValue()));
     }
 
     private String toStr(ErrorType type, int code, BigInteger xid) {
index 58637d97be4f9f19d842a15f6b1de8e4376aaf33..c761ae54980454f0ffc62cfcffa22c0c32c88795 100644 (file)
@@ -659,7 +659,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.error(throwable.getMessage(), throwable);
+                LOG.error("Status of Group Data Loaded Transaction : failure. Reason : {}", throwable);
                 ci.println(String.format("Status of Group Data Loaded Transaction : failure. Reason : %s", throwable));
             }
         }, MoreExecutors.directExecutor());
@@ -716,7 +716,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
             @Override
             public void onFailure(Throwable throwable) {
-                LOG.error(throwable.getMessage(), throwable);
+                LOG.error("Status of Group Data Loaded Transaction : failure. Reason : {}", throwable);
                 ci.println(String.format("Status of Group Data Loaded Transaction : failure. Reason : %s", throwable));
             }
         }, MoreExecutors.directExecutor());
index 0c30639811a8db32247fff27b46dcd98cc2fbf65..b1c69012d46b903a496071bdf586595443d9b5ea 100644 (file)
@@ -102,8 +102,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<AddGroupOutput>> addGroup(AddGroupInput input) {
-        String plus = "addGroup - " + input;
-        OpenflowpluginGroupTestServiceProvider.LOG.info(plus);
+        OpenflowpluginGroupTestServiceProvider.LOG.info("addGroup - {}", input);
         return null;
     }
 
@@ -119,8 +118,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
     @Override
     public ListenableFuture<RpcResult<RemoveGroupOutput>> removeGroup(
             RemoveGroupInput input) {
-        String plus = "removeGroup - " + input;
-        OpenflowpluginGroupTestServiceProvider.LOG.info(plus);
+        OpenflowpluginGroupTestServiceProvider.LOG.info("removeGroup - {}", input);
         return null;
     }
 
@@ -136,8 +134,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
     @Override
     public ListenableFuture<RpcResult<UpdateGroupOutput>> updateGroup(
             UpdateGroupInput input) {
-        String plus = "updateGroup - " + input;
-        OpenflowpluginGroupTestServiceProvider.LOG.info(plus);
+        OpenflowpluginGroupTestServiceProvider.LOG.info("updateGroup - {}", input);
         return null;
     }
 
index 9ca3d4fdae88474657192ed113bb224fc5e03f5f..2ca6c7a3d8b2ef542917568627dc40fe4d5b2312 100644 (file)
@@ -102,23 +102,20 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
 
         @Override
         public void onMeterAdded(MeterAdded notification) {
-            LOG.info("Meter to be added.........................." + notification.toString());
-            LOG.info("Meter  Xid........................." + notification.getTransactionId().getValue());
-            LOG.info("-----------------------------------------------------------------------------------");
+            LOG.info("Meter to be added {}", notification.toString());
+            LOG.info("Meter  Xid {}", notification.getTransactionId().getValue());
         }
 
         @Override
         public void onMeterRemoved(MeterRemoved notification) {
-            LOG.info("Meter to be removed.........................." + notification.toString());
-            LOG.info("Meter  Xid........................." + notification.getTransactionId().getValue());
-            LOG.info("-----------------------------------------------------------------------------------");
+            LOG.info("Meter to be removed {}", notification.toString());
+            LOG.info("Meter  Xid {}", notification.getTransactionId().getValue());
         }
 
         @Override
         public void onMeterUpdated(MeterUpdated notification) {
-            LOG.info("Meter to be updated.........................." + notification.toString());
-            LOG.info("Meter  Xid........................." + notification.getTransactionId().getValue());
-            LOG.info("-----------------------------------------------------------------------------------");
+            LOG.info("Meter to be updated {}", notification.toString());
+            LOG.info("Meter  Xid {}", notification.getTransactionId().getValue());
         }
 
     }
index 98cfe835e242c2a13d3656dcfa3c6f5914dd20c8..cf89034d30740db2672a4c09b97fa671d96a7c07 100644 (file)
@@ -119,8 +119,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
-        String plus = "addMeter - " + input;
-        OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+        OpenflowpluginMeterTestServiceProvider.LOG.info("addMeter - {}", input);
         return null;
     }
 
@@ -136,8 +135,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
     @Override
     public ListenableFuture<RpcResult<RemoveMeterOutput>> removeMeter(
             final RemoveMeterInput input) {
-        String plus = "removeMeter - " + input;
-        OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+        OpenflowpluginMeterTestServiceProvider.LOG.info("removeMeter - {}", input);
         return null;
     }
 
@@ -153,8 +151,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
     @Override
     public ListenableFuture<RpcResult<UpdateMeterOutput>> updateMeter(
             final UpdateMeterInput input) {
-        String plus = "updateMeter - " + input;
-        OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+        OpenflowpluginMeterTestServiceProvider.LOG.info("updateMeter - {}", input);
         return null;
     }
 
index ea49777c0fa1b1fb17a5e37a83fdb936c01ad1c0..c2c14c7a3bccf265a7655110a30ac614a56cf66c 100644 (file)
@@ -99,8 +99,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     @Override
     public ListenableFuture<RpcResult<UpdateTableOutput>> updateTable(
             UpdateTableInput input) {
-        String plus = "updateTable - " + input;
-        OpenflowpluginTableFeaturesTestServiceProvider.LOG.info(plus);
+        OpenflowpluginTableFeaturesTestServiceProvider.LOG.info("updateTable - {}", input);
         return null;
     }
 
index 01cac59d94b2d19bc9785905b99fc07258470248..f8a7081648199553b9f0511d9502c762f94e0a54 100644 (file)
@@ -3160,7 +3160,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
             @Override
             public void onFailure(final Throwable throwable) {
-                LOG.error(throwable.getMessage(), throwable);
+                LOG.error("Status of Group Data Loaded Transaction : failure. Reason : {}", throwable);
                 ci.println(String.format("Status of Group Data Loaded Transaction : failure. Reason : %s", throwable));
             }
         }, MoreExecutors.directExecutor());
@@ -3200,7 +3200,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
             @Override
             public void onFailure(final Throwable throwable) {
-                LOG.error(throwable.getMessage(), throwable);
+                LOG.error("Status of Group Data Loaded Transaction : failure. Reason : {}", throwable);
                 ci.println(String.format("Status of Group Data Loaded Transaction : failure. Reason : %s", throwable));
             }
         }, MoreExecutors.directExecutor());
index 9eb918fadc3f8d2d712ca41323af3f4458ace8ac..d40e74159354ce1ec8131a0c29778a25eee02465 100644 (file)
@@ -43,33 +43,29 @@ public class OpenflowpluginTestNodeConnectorNotification {
 
         @Override
         public void onNodeConnectorRemoved(NodeConnectorRemoved notification) {
-            LOG.debug("NodeConnectorRemoved Notification ...................");
-            LOG.debug("NodeConnectorRef " + notification.getNodeConnectorRef());
-            LOG.debug("----------------------------------------------------------------------");
+            LOG.debug("NodeConnectorRemoved Notification");
+            LOG.debug("NodeConnectorRef {}", notification.getNodeConnectorRef());
             nodeConnectorRemoved.add(notification);
         }
 
         @Override
         public void onNodeConnectorUpdated(NodeConnectorUpdated notification) {
-            LOG.debug("NodeConnectorUpdated Notification...................");
-            LOG.debug("NodeConnectorRef " + notification.getNodeConnectorRef());
-            LOG.debug("----------------------------------------------------------------------");
+            LOG.debug("NodeConnectorUpdated Notification");
+            LOG.debug("NodeConnectorRef {}", notification.getNodeConnectorRef());
             nodeConnectorUpdated.add(notification);
         }
 
         @Override
         public void onNodeRemoved(NodeRemoved notification) {
-            LOG.debug("NodeRemoved Notification ...................");
-            LOG.debug("NodeRef " + notification.getNodeRef());
-            LOG.debug("----------------------------------------------------------------------");
+            LOG.debug("NodeRemoved Notification");
+            LOG.debug("NodeRef {}", notification.getNodeRef());
             nodeRemoved.add(notification);
         }
 
         @Override
         public void onNodeUpdated(NodeUpdated notification) {
-            LOG.debug("NodeUpdated Notification ...................");
-            LOG.debug("NodeRef " + notification.getNodeRef());
-            LOG.debug("----------------------------------------------------------------------");
+            LOG.debug("NodeUpdated Notification");
+            LOG.debug("NodeRef {}", notification.getNodeRef());
             nodeUpdated.add(notification);
         }
     }
index 10ee6a4d0dd0ceafdc4286e98c2feec3d2b28240..3aa5ecf58f5c79969f77c45ff8f2295343de194f 100644 (file)
@@ -107,8 +107,7 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<AddFlowOutput>> addFlow(AddFlowInput input) {
-        String plus = "addFlow - " + input;
-        OpenflowpluginTestServiceProvider.LOG.info(plus);
+        OpenflowpluginTestServiceProvider.LOG.info("addFlow - {}", input);
         return null;
     }
 
@@ -123,8 +122,7 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<RemoveFlowOutput>> removeFlow(RemoveFlowInput input) {
-        String plus = "removeFlow - " + input;
-        OpenflowpluginTestServiceProvider.LOG.info(plus);
+        OpenflowpluginTestServiceProvider.LOG.info("removeFlow - {}", input);
         return null;
     }
 
@@ -139,8 +137,7 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<UpdateFlowOutput>> updateFlow(UpdateFlowInput input) {
-        String plus = "updateFlow - " + input;
-        OpenflowpluginTestServiceProvider.LOG.info(plus);
+        OpenflowpluginTestServiceProvider.LOG.info("updateFlow - {}", input);
         return null;
     }