Neon MRI changes 55/76055/16
authorLorand Jakab <lojakab@cisco.com>
Thu, 25 Oct 2018 16:40:46 +0000 (18:40 +0200)
committerLorand Jakab <lojakab@cisco.com>
Thu, 25 Oct 2018 16:40:46 +0000 (18:40 +0200)
This patch bumps:
- odlparent to 4.0.2
- mdsal to 3.0.1

It also deals with:
- adjust dependencies to account for ietf-{inet,yang}-types movement
- new checkstyle failures
- bump odlparent feature version range from [3.1.0,4) to [4,5)
- move to odl-guava instead of the version explicit odl-guava-23
- move blueprints from org/opendaylight to OSGI-INF directory

JIRA: LISPMAP-175
Change-Id: Ia065800c9b92362371550f8e9c93eb6f3da57d4e
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
48 files changed:
artifacts/pom.xml
commons/parent/pom.xml
features/features-lispflowmapping/pom.xml
features/odl-lispflowmapping-inmemorydb/pom.xml
features/odl-lispflowmapping-mappingservice-shell/pom.xml
features/odl-lispflowmapping-mappingservice/pom.xml
features/odl-lispflowmapping-models/pom.xml
features/odl-lispflowmapping-msmr/pom.xml
features/odl-lispflowmapping-neutron/pom.xml
features/odl-lispflowmapping-southbound/pom.xml
features/odl-lispflowmapping-southbound/src/main/feature/feature.xml
features/pom.xml
lispflowmapping-karaf/pom.xml
mappingservice/api/pom.xml
mappingservice/dsbackend/pom.xml
mappingservice/dsbackend/src/test/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEndTest.java
mappingservice/implementation/pom.xml
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/timebucket/containers/TimeBucket.java
mappingservice/implementation/src/main/resources/OSGI-INF/blueprint/mappingservice.xml [moved from mappingservice/implementation/src/main/resources/org/opendaylight/blueprint/mappingservice.xml with 100% similarity]
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/LispMappingServiceTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/MappingSystemTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServerTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MappingServiceTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/timebucket/TimeBucketWheelUnitTest.java
mappingservice/inmemorydb/pom.xml
mappingservice/inmemorydb/src/main/resources/OSGI-INF/blueprint/mappingservice-inmemory-db.xml [moved from mappingservice/inmemorydb/src/main/resources/org/opendaylight/blueprint/mappingservice-inmemory-db.xml with 100% similarity]
mappingservice/inmemorydb/src/test/java/org/opendaylight/lispflowmapping/inmemorydb/HashMapDbTest.java
mappingservice/lisp-proto/pom.xml
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/authentication/LispMACAuthentication.java
mappingservice/lisp-proto/src/main/java/org/opendaylight/lispflowmapping/lisp/util/MappingRecordUtil.java
mappingservice/lisp-proto/src/test/java/org/opendaylight/lispflowmapping/serializer/MapRegisterSerializationTest.java
mappingservice/mapcache/pom.xml
mappingservice/mapcache/src/test/java/org/opendaylight/lispflowmapping/mapcache/FlatMapCacheTest.java
mappingservice/neutron/pom.xml
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/mappingmanager/mappers/HostIdToRlocMapper.java
mappingservice/neutron/src/main/resources/OSGI-INF/blueprint/neutron.xml [moved from mappingservice/neutron/src/main/resources/org/opendaylight/blueprint/neutron.xml with 100% similarity]
mappingservice/neutron/src/test/java/org/opendaylight/lispflowmapping/neutron/PortDataProcessorTest.java
mappingservice/neutron/src/test/java/org/opendaylight/lispflowmapping/neutron/mappingmanager/HostInformationManagerTest.java
mappingservice/neutron/src/test/java/org/opendaylight/lispflowmapping/neutron/mappingmanager/PortUuidToPortDataMapperTest.java
mappingservice/pom.xml
mappingservice/shell/src/main/resources/OSGI-INF/blueprint/mappingservice-shell.xml [moved from mappingservice/shell/src/main/resources/org/opendaylight/blueprint/mappingservice-shell.xml with 100% similarity]
mappingservice/southbound/pom.xml
mappingservice/southbound/src/main/resources/OSGI-INF/blueprint/mappingservice-southbound.xml [moved from mappingservice/southbound/src/main/resources/org/opendaylight/blueprint/mappingservice-southbound.xml with 100% similarity]
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPluginTest.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRpcTest.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundHandlerTest.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispXtrSouthboundHandlerTest.java

index e60ac97d8027efdd0faf33a4c57cf528e553be3e..847b852b771308548a7f8a9d8f4cb4abfb37ce7c 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index eb692a8c659b48d0261808faf102611e6c410323..d0553b2a2bcdba47f5753c9715a7f18359719cd4 100644 (file)
@@ -15,7 +15,7 @@
          for plugin configuration etc. -->
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -50,7 +50,7 @@
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
        <scope>import</scope>
       </dependency>
index 3b57729e545ea9867aface8192cc4daa7cbd8a72..1b768289c5ec1a72db0c32f14d569cecbf8d3eea 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>feature-repo-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 2449dbdc689320be5317784621aa828d354a7817..53d7ae438d58d51b0fa531cd5e28554acb108202 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index fbd3feeb8b2850e67ce197c6f95eb88b63f56b68..f41b5708476f6c03e87bf5d393a9f796231405da 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index ea3eda6cfee5a443a0a66fc4249ea0ee80fe9e14..c141b1758385856a7c52107f67a91d1b1f97dd30 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 8fac7f781bd2c1002b43657415fd578054ff43cc..198820fdcd48c4be126d9b31fefb3e5454730809 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index efe1e542ac5f05cb0d88a18b25043efd68ec7817..80c160638e374a126998afeb6324fdb5cf0b46de 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 39a16bb1abb9055b5ae8516dd839713b50867afa..0c2178cdca967c17551b4629371650e4f63ad105 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 50be8562ac35092f64715f88e3422c259720ecc2..0e45c9e994dd3c308cc529415887a8441213db6d 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -47,7 +47,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     </dependency>
     <dependency>
       <groupId>org.opendaylight.odlparent</groupId>
-      <artifactId>odl-guava-23</artifactId>
+      <artifactId>odl-guava</artifactId>
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
index 9eed6228c89f3fbe34f5acd98dce0e2dc8b75312..c1081a7179fc8ca5c2a8eec342d57b9843b06ad2 100644 (file)
@@ -8,7 +8,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
 -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-lispflowmapping-southbound">
     <feature name="odl-lispflowmapping-southbound">
-        <feature version="[3.1.0,4)">odl-netty-4</feature>
-        <feature version="[3.1.0,4)">odl-guava-23</feature>
+        <feature version="[4,5)">odl-netty-4</feature>
+        <feature version="[4,5)">odl-guava</feature>
     </feature>
 </features>
index ecc51e60011410d40f130cc171458da0751c5863..dad0d3ee9c64fdecd8c23f49c1bc5b33bb45d6ec 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 58b5e7e8bc8475376e37a760eea8928be3d2205a..2555b81289bf45399373bb3f1580eed33e56f4d7 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 6b49cd2a65b125abb145e936452c90cb9375d61f..501b8dbc9bad222137e7b2a2db888639764b00cc 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
@@ -32,8 +32,8 @@
       <artifactId>yang-ext</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-ietf-inet-types</artifactId>
     </dependency>
   </dependencies>
 
index b0df3047a2dd1e8306d9423f00c8a707550da136..26aa4acdd4d8c79245cdd7507c7c0daf8256a96b 100644 (file)
@@ -42,7 +42,7 @@
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
+      <artifactId>powermock-api-mockito2</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index c59471aae0b55bb3680c1574c7500c63e0c2db12..2ee0a2d952c2909f1e84db297fca62bf5d9efae4 100644 (file)
@@ -22,7 +22,7 @@ import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
index bf1ec44bc6d9d064ce1b53067c3d4c75028b6290..ceaabf09c7083ed3637278bfee1c6b669fa3c0a0 100644 (file)
@@ -50,7 +50,7 @@
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
+      <artifactId>powermock-api-mockito2</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index 6e21970964f2645b3f9761f29a7ad2dbff7c6889..cffe326be1cabac68463fbf6f2624e9811c18af8 100644 (file)
@@ -23,7 +23,7 @@ import org.mockito.ArgumentMatcher;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
 import org.opendaylight.lispflowmapping.interfaces.lisp.IMapResolverAsync;
 import org.opendaylight.lispflowmapping.interfaces.lisp.IMapServerAsync;
@@ -120,7 +120,6 @@ public class LispMappingServiceTest {
     public void handleMapRequestTest() {
         final MapRequest mapRequest = Mockito.mock(MapRequest.class);
         final MapReply mapReply = new MapReplyBuilder().build();
-        Mockito.when(mapRequest.getEidItem()).thenReturn(Lists.newArrayList(EID_ITEM_BUILDER.build()));
         Mockito.when(tlsMapRequestMock.get()).thenReturn(null);
         Mockito.when(tlsMapReplyMock.get()).thenReturn(mapReply);
 
@@ -130,7 +129,7 @@ public class LispMappingServiceTest {
         Mockito.verify(tlsMapRequestMock).get();
         Mockito.verifyNoMoreInteractions(tlsMapRequestMock);
         Mockito.verify(mapResolverMock).handleMapRequest(mapRequest);
-        Mockito.verify(tlsMapReplyMock).set(Mockito.any(MapReply.class));
+        Mockito.verify(tlsMapReplyMock).set(Mockito.any());
         Mockito.verify(tlsMapReplyMock).get();
 
         assertEquals(result, mapReply);
@@ -147,7 +146,6 @@ public class LispMappingServiceTest {
                 .setMapRequest(pair.getLeft())
                 .setTransportAddress(pair.getRight());
 
-        Mockito.when(mapRequest.getEidItem()).thenReturn(Lists.newArrayList(EID_ITEM_BUILDER.build()));
         Mockito.when(tlsMapRequestMock.get()).thenReturn(pair);
 
         assertNull(lispMappingService.handleMapRequest(mapRequest));
@@ -162,13 +160,11 @@ public class LispMappingServiceTest {
     public void handleMapRegisterTest() {
         final Pair<MapNotify, List<TransportAddress>> pairMock = Mockito.mock(Pair.class);
 
-        Mockito.when(mapRegisterMock.getMappingRecordItem())
-                .thenReturn(Lists.newArrayList(MAPPING_RECORD_ITEM_BUILDER.build()));
         Mockito.when(tlsMapNotifyMock.get()).thenReturn(pairMock);
 
         lispMappingService.handleMapRegister(mapRegisterMock);
         Mockito.verify(mapServerMock).handleMapRegister(mapRegisterMock);
-        Mockito.verify(tlsMapNotifyMock).set(Mockito.any(MutablePair.class));
+        Mockito.verify(tlsMapNotifyMock).set(Mockito.any());
     }
 
     /**
@@ -182,8 +178,6 @@ public class LispMappingServiceTest {
         final AddMapping addMapping = Mockito.mock(AddMapping.class);
 
         Mockito.when(addMapping.getMapRegister()).thenReturn(mapRegister);
-        Mockito.when(mapRegister.getMappingRecordItem())
-                .thenReturn(Lists.newArrayList(MAPPING_RECORD_ITEM_BUILDER.build()));
         Mockito.when(tlsMapNotifyMock.get()).thenReturn(getDefaultMapNotifyPair());
 
         lispMappingService.onAddMapping(addMapping);
@@ -202,8 +196,6 @@ public class LispMappingServiceTest {
         final MapNotify mapNotify = new MapNotifyBuilder().setKeyId((short) 1).build();
 
         Mockito.when(addMapping.getMapRegister()).thenReturn(mapRegister);
-        Mockito.when(mapRegister.getMappingRecordItem())
-                .thenReturn(Lists.newArrayList(MAPPING_RECORD_ITEM_BUILDER.build()));
         Mockito.when(tlsMapNotifyMock.get()).thenReturn(new MutablePair<>(mapNotify, null));
         Mockito.when(addMapping.getTransportAddress()).thenReturn(TRANSPORT_ADDRESS_1);
 
@@ -230,7 +222,6 @@ public class LispMappingServiceTest {
 
         Mockito.when(requestMapping.getMapRequest()).thenReturn(mapRequest);
         Mockito.when(requestMapping.getTransportAddress()).thenReturn(TRANSPORT_ADDRESS_1);
-        Mockito.when(mapRequest.getEidItem()).thenReturn(Lists.newArrayList(EID_ITEM_BUILDER.build()));
         Mockito.when(tlsMapReplyMock.get()).thenReturn(mapReply);
 
         // result
@@ -253,7 +244,6 @@ public class LispMappingServiceTest {
                     .maprequestnotification.MapRequest.class);
 
         Mockito.when(requestMapping.getMapRequest()).thenReturn(mapRequest);
-        Mockito.when(mapRequest.getEidItem()).thenReturn(Lists.newArrayList(EID_ITEM_BUILDER.build()));
         Mockito.when(tlsMapReplyMock.get()).thenReturn(null);
 
         lispMappingService.onRequestMapping(requestMapping);
@@ -403,10 +393,9 @@ public class LispMappingServiceTest {
                 .setTimestamp(TIMESTAMP).build();
     }
 
-    class TransportAddressMatch extends ArgumentMatcher<SendMapNotifyInput> {
-        public boolean matches(Object sendMapNotify) {
-            final SendMapNotifyInput sendMapNotifyInput = (SendMapNotifyInput) sendMapNotify;
-            final TransportAddress notifyTransportAddress = sendMapNotifyInput.getTransportAddress();
+    class TransportAddressMatch implements ArgumentMatcher<SendMapNotifyInput> {
+        public boolean matches(SendMapNotifyInput sendMapNotify) {
+            final TransportAddress notifyTransportAddress = sendMapNotify.getTransportAddress();
             return TRANSPORT_ADDRESS_1.equals(notifyTransportAddress)
                     || TRANSPORT_ADDRESS_2.equals(notifyTransportAddress);
         }
index 494aabde10f019bbf33b4249faf738eca3619425..46cea2dd7b99388c88601f04606ad3bf400bdf47 100644 (file)
@@ -26,7 +26,7 @@ import org.mockito.ArgumentCaptor;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.lispflowmapping.config.ConfigIni;
index 7e24eaf118892c556e4c3ce7546e2642b26286ed..1593a82da58342003eea5f91686f3a3771fe64df 100644 (file)
@@ -25,7 +25,7 @@ import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.Spy;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
 import org.opendaylight.lispflowmapping.config.ConfigIni;
 import org.opendaylight.lispflowmapping.interfaces.dao.SubKeys;
@@ -172,8 +172,6 @@ public class MapServerTest {
     @Test
     public void handleMapRegisterTest_MappingMergeFalse() throws NoSuchFieldException, IllegalAccessException {
         Mockito.when(mapService.getMapping(MappingOrigin.Southbound, IPV4_EID_1)).thenReturn(OLD_MAPPING_DATA_1);
-        Mockito.when(mapService.getData(MappingOrigin.Southbound, IPV4_EID_1, SubKeys.SUBSCRIBERS))
-                .thenReturn(subscriberSetMock_1);
 
         mappingData.setMergeEnabled(false);
         mapServer.handleMapRegister(mapRegister);
@@ -261,8 +259,6 @@ public class MapServerTest {
                 .thenReturn(OLD_MAPPING_DATA_1)
                 .thenReturn(OLD_MAPPING_DATA_2)
                 .thenReturn(getDefaultMappingData(getDefaultMappingRecordBuilder().build()));
-        Mockito.when(mapService.getData(MappingOrigin.Southbound, IPV4_EID_1, SubKeys.SUBSCRIBERS))
-                .thenReturn(subscriberSetMock_1);
         Mockito.when(mapService.getData(MappingOrigin.Southbound, IPV4_EID_1, SubKeys.SRC_RLOCS))
                 .thenReturn(DEFAULT_IP_ADDRESS_SET);
 
index 61f721de23134fc82c7ae84619f5faebddf5e51a..0f3ca539dc7dc650b2de0a198af55326fc058177 100644 (file)
@@ -18,7 +18,7 @@ import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.lispflowmapping.dsbackend.DataStoreBackEnd;
@@ -568,4 +568,4 @@ public class MappingServiceTest {
                 .setRecordTtl(60)
                 .setEid(IPV4_EID);
     }
-}
\ No newline at end of file
+}
index f549a0af80d09e3ec4010194b8d475ee5fe24325..4277ed26541c6c2372c53e7aa0e5bb61d9e32204 100644 (file)
@@ -17,7 +17,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.lispflowmapping.config.ConfigIni;
 import org.opendaylight.lispflowmapping.implementation.MappingSystem;
 import org.opendaylight.lispflowmapping.implementation.timebucket.containers.TimeBucket;
@@ -298,4 +298,4 @@ public class TimeBucketWheelUnitTest {
                 .setTimestamp(new Date().getTime())
                 .setXtrId(XTR_ID_1);
     }
-}
\ No newline at end of file
+}
index aad44188ff30bdff7b8255b43c7c819420a20aca..e67323c7d8f10bc87383bc3071218fb22fbd461a 100644 (file)
       <artifactId>mappingservice.api</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>compile</scope>
-    </dependency>
   </dependencies>
 
   <build>
index c0c03843e4ea9c1969b5ca698b45aa04482135cb..41209d85a45e423479be612d436b3f7035606cfe 100644 (file)
@@ -188,11 +188,11 @@ public class HashMapDbTest {
                 new MappingEntry<Object>(mapKey2, mapValue2),
                 new MappingEntry<Object>(mapKey3, mapValue3));
 
-        Map mapResult = new HashMap<>();
         Map mapSample = new HashMap<>();
         mapSample.put(mapKey1, mapValue1);
         mapSample.put(mapKey2, mapValue2);
         mapSample.put(mapKey3, mapValue3);
+        Map mapResult = new HashMap<>();
         map.getAll((keyId, valueKey, value) -> {
             Assert.assertEquals(dbEntryKey, keyId);
             mapResult.put(valueKey, value);
index b9240a6918a78c3042ebd87b19f22097098bdcbc..e4f59b371966b022a6b2be2ab96e5671b39c7a25 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
@@ -30,12 +30,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <dependencies>
     <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-ietf-inet-types</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-ietf-yang-types</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
@@ -61,11 +61,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>1.4</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>
index f1cc5199ced81f21393040556fa6474108b69bb1..3de883a9de8a79d6b0ac259fc0680c2c46730d8c 100644 (file)
@@ -97,4 +97,4 @@ public class LispMACAuthentication implements ILispAuthentication {
     public void setAlgorithm(String algorithm) {
         this.algorithm = algorithm;
     }
-}
\ No newline at end of file
+}
index a5b4aeba7f01a1897d188899d2cae5c10ce23235..fed3229c36b3fe4388066ebb137e5a96c2ab53bc 100644 (file)
@@ -71,4 +71,4 @@ public final class MappingRecordUtil {
         LOG.trace("mappingChanged(): FALSE");
         return false;
     }
-}
\ No newline at end of file
+}
index ce0eec454c2f4f3225cbdfe01c478e50fb010f18..0ccc7d5b3b7d645ec3e2fe5ade48bf3da77b1b55 100644 (file)
@@ -28,8 +28,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.Ma
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.SiteId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.locatorrecords.LocatorRecord;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecordBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItem;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItemBuilder;
index a6c1863b092df1d76ef156cc044611f597fe297c..50011168da86189c14a3bb31680be1c847a3cde1 100644 (file)
       <groupId>${project.groupId}</groupId>
       <artifactId>mappingservice.lisp-proto</artifactId>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>compile</scope>
-    </dependency>
   </dependencies>
 </project>
index 0b30097fce088c89d5683b5866f5902bdf3abd4a..4f1f19cc5eb77fe3c85877bb51fb0607e5d92eb8 100644 (file)
@@ -8,8 +8,8 @@
 package org.opendaylight.lispflowmapping.mapcache;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.atMost;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
index 47ab6bb7004c5609bee489954970bf6456b7edbb..3d45c65a0f36ae13c73b5e35e6e320e4a00a6d50 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
       <artifactId>yang-ext</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>ietf-interfaces</artifactId>
+      <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+      <artifactId>rfc8343</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>iana-if-type-2014-05-08</artifactId>
+      <groupId>org.opendaylight.mdsal.binding.model.iana</groupId>
+      <artifactId>iana-if-type</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>ietf-ip-2014-06-16</artifactId>
+      <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+      <artifactId>rfc7277</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.netconf</groupId>
@@ -85,7 +85,7 @@
     <dependency>
       <groupId>org.opendaylight.mdsal</groupId>
       <artifactId>mdsal-singleton-common-api</artifactId>
-      <version>2.6.0-SNAPSHOT</version>
+      <version>3.0.1</version>
     </dependency>
 
     <!--Needed for testing-->
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
+      <artifactId>powermock-api-mockito2</artifactId>
+      <version>2.0.0-beta.5</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.powermock</groupId>
+      <artifactId>powermock-api-support</artifactId>
+      <version>2.0.0-beta.5</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.powermock</groupId>
+      <artifactId>powermock-core</artifactId>
+      <version>2.0.0-beta.5</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.powermock</groupId>
+      <artifactId>powermock-reflect</artifactId>
+      <version>2.0.0-beta.5</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
       <artifactId>powermock-module-junit4</artifactId>
+      <version>2.0.0-beta.5</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index 054e88df41ecb4c1ccf60eac87ac915fb4a0a820..9140c66389a11693eda5614b2576aa422ab44751 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.lispflowmapping.neutron;
 
 import com.google.common.collect.Lists;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.List;
@@ -17,7 +18,6 @@ import java.util.concurrent.Future;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
 import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
 import org.opendaylight.lispflowmapping.neutron.mappingmanager.HostInformationManager;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
@@ -68,7 +68,15 @@ public class PortDataProcessorTest {
         augmentationMock = Mockito.mock(PortBindingExtension.class);
         future = Mockito.mock(Future.class);
         rpcResult = Mockito.mock(RpcResult.class);
-        Whitebox.setInternalState(portDataProcessor, "hostInformationManager", hostInformationManager);
+
+        try {
+            Field field = portDataProcessor.getClass().getDeclaredField("hostInformationManager");
+            field.setAccessible(true);
+            field.set(portDataProcessor, hostInformationManager);
+        } catch (Exception e) {
+            throw new RuntimeException("Unable to set hostInformationManager", e);
+        }
+
         // common stubbing is called before invocation of each test
         commonStubbing();
     }
index a353a854e8de81779344ed31694f493cec67c05a..a46aa897ed7f55b187994d5bbdfb391d3620fb0c 100644 (file)
@@ -14,7 +14,7 @@ import java.util.List;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
 import org.opendaylight.lispflowmapping.neutron.LispUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
index 874a391fcbac4a1ae3d1d0b9b5d6398320974c25..21986269e22561e32525000c85d8c5ca1ea098e5 100644 (file)
@@ -13,7 +13,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.lispflowmapping.neutron.mappingmanager.mappers.PortUuidToPortDataMapper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
 import org.powermock.core.classloader.annotations.PrepareForTest;
index 68953d3e9cb67c64bc421653b4c563193a8fa3ad..e62daa6ca0d6a942365834946086a04229c916a2 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -39,7 +39,7 @@
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
         <version>1.4</version>
         <scope>test</scope>
       </dependency>
+      <!-- Use PowerMock 2 (beta) -->
+      <dependency>
+        <groupId>org.powermock</groupId>
+        <artifactId>powermock-api-mockito2</artifactId>
+        <version>2.0.0-beta.5</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.powermock</groupId>
+        <artifactId>powermock-api-support</artifactId>
+        <version>2.0.0-beta.5</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.powermock</groupId>
+        <artifactId>powermock-core</artifactId>
+        <version>2.0.0-beta.5</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.powermock</groupId>
+        <artifactId>powermock-reflect</artifactId>
+        <version>2.0.0-beta.5</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.powermock</groupId>
+        <artifactId>powermock-module-junit4</artifactId>
+        <version>2.0.0-beta.5</version>
+        <scope>test</scope>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
   <build>
     <pluginManagement>
       <plugins>
index 529365bf1e8d0ba44370d4201e39a42c08db487c..03a9bb0da590a4d8b2f06450e6ae370932703bbd 100644 (file)
       <artifactId>common.unittest.tools</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.powermock</groupId>
-      <artifactId>powermock-module-junit4</artifactId>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-inline</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index 0f201d7bc57373fda2d223ea7ec445674e5a98fc..40d3af8286988e423cac75e911dea62f9089de3c 100644 (file)
@@ -24,7 +24,6 @@ import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -40,12 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev16
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MessageType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddressBuilder;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
 
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(NioDatagramChannel.class)
 public class LispSouthboundPluginTest {
 
     private static NioDatagramChannel channel;
@@ -79,8 +73,8 @@ public class LispSouthboundPluginTest {
         lispSouthboundPlugin.setBindingAddress(ADDRESS_1);
         lispSouthboundPlugin.setMapRegisterCacheEnabled(false);
 
-        channel = PowerMockito.mock(NioDatagramChannel.class);
-        xtrChannel = PowerMockito.mock(NioDatagramChannel.class);
+        channel = Mockito.mock(NioDatagramChannel.class);
+        xtrChannel = Mockito.mock(NioDatagramChannel.class);
         injectChannel();
         injectXtrChannel();
     }
index 73382eb024e5dd3102c800d92e59fafb9f66acf5..bc0ffd22033aa32aef20238567c95371d1856780 100644 (file)
@@ -18,7 +18,7 @@ import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapNotifySerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapRegisterSerializer;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapReplySerializer;
index 36a27f7b6ba53ccbae354bb4c9a8806b6b90a682..1321c83953cfa3c7017f3b6b78eace9cbc1e14c8 100644 (file)
@@ -14,7 +14,7 @@ import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 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.DataTreeIdentifier;
index aae6e3d8e02ef2a0dcf6163c46968b9613fe78f1..2df6493a3e83d9ce2156a2610d7996b94aa7d523 100644 (file)
@@ -36,8 +36,8 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.AdditionalMatchers;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.lispflowmapping.lisp.serializer.MapNotifySerializer;
@@ -118,22 +118,26 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
     @BeforeClass
     public static void initTests() {
         akdb = Mockito.mock(AuthKeyDb.class);
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid("10.10.10.10/8"))))
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid(
+                "10.10.10.10/8"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv6PrefixBinaryEid(
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv6PrefixBinaryEid(
                 "2610:d0:ffff:192:0:0:0:1/128"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid("153.16.254.1/32"))))
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid(
+                "153.16.254.1/32"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid("125.124.123.122/8",
-                new InstanceIdType(21L)))))
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid(
+                "125.124.123.122/8", new InstanceIdType(21L)))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asMacEid("0a:0b:0c:0d:0e:0f"))))
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asMacEid(
+                "0a:0b:0c:0d:0e:0f"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv6PrefixBinaryEid(
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv6PrefixBinaryEid(
                 "f0f:f0f:f0f:f0f:f0f:f0f:f0f:f0f/8"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
-        Mockito.when(akdb.getAuthenticationKey(Matchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid("172.1.1.2/32"))))
+        Mockito.when(akdb.getAuthenticationKey(ArgumentMatchers.eq(LispAddressUtil.asIpv4PrefixBinaryEid(
+                "172.1.1.2/32"))))
                 .thenReturn(new MappingAuthkeyBuilder().setKeyType(1).setKeyString("password").build());
 
         akdl = Mockito.mock(AuthenticationKeyDataListener.class);
@@ -611,6 +615,7 @@ public class LispSouthboundHandlerTest extends BaseTestCase {
         MapRegisterCacheMetadataBuilder cacheMetadataBld = new MapRegisterCacheMetadataBuilder();
         cacheMetadataBld.setTimestamp(System.currentTimeMillis() - (cacheRecordTimeouted ? CACHE_RECORD_TIMEOUT : 0L));
         cacheMetadataBld.setWantMapNotify(false);
+        cacheMetadataBld.setEidLispAddress(new ArrayList<>());
 
         MapRegisterCacheValueBuilder cacheValueBld = new MapRegisterCacheValueBuilder();
         cacheValueBld.setMapRegisterCacheMetadata(cacheMetadataBld.build());
index 5259536c02e0221ae5084cf01785e998ba13cd09..8c77ec1849ce934e0e16935f9bf3546e24776ad5 100644 (file)
@@ -23,7 +23,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.lispflowmapping.lisp.util.LispAddressStringifier;
 import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
 import org.opendaylight.lispflowmapping.southbound.LispSouthboundPlugin;
@@ -241,4 +241,4 @@ public class LispXtrSouthboundHandlerTest {
                 .setSmr(false)
                 .setSmrInvoked(false);
     }
-}
\ No newline at end of file
+}