BUG-6378: Fix PeerExportGroup
[bgpcep.git] / bgp / path-selection-mode / src / test / java / org / opendaylight / protocol / bgp / mode / impl / AbstractRouteEntryTest.java
index bad58b64398ed0b8bf63a7fb28cebe8917eacb87..85fe15e6d47f0f2319ddeb39b310e9ad2e0a4c85 100644 (file)
@@ -170,11 +170,12 @@ public class AbstractRouteEntryTest {
     }
 
     private void mockExportGroup() {
-        Mockito.doReturn(this.attributes).when(this.peg).effectiveAttributes(Mockito.any(PeerId.class), Mockito.any(ContainerNode.class));
-        Mockito.doReturn(null).when(this.pegNot).effectiveAttributes(Mockito.any(PeerId.class), Mockito.any(ContainerNode.class));
+        Mockito.doReturn(this.attributes).when(this.peg).effectiveAttributes(Mockito.any(PeerRole.class), Mockito.any(ContainerNode.class));
+        Mockito.doReturn(null).when(this.pegNot).effectiveAttributes(Mockito.any(PeerRole.class), Mockito.any(ContainerNode.class));
 
         Map<PeerId, PeerExportGroup.PeerExporTuple> peers = new HashMap<>();
         Mockito.doReturn(ImmutableList.copyOf(peers.entrySet())).when(this.pegNot).getPeers();
+        Mockito.doReturn(true).when(this.pegNot).containsPeer(Mockito.any(PeerId.class));
 
         peers.put(PEER_ID, new PeerExportGroup.PeerExporTuple(PEER_YII, PeerRole.Ibgp));
         peers.put(PEER_ID2, new PeerExportGroup.PeerExporTuple(PEER_YII2, PeerRole.Ibgp));