BGPCEP-754: Rework EffectiveRibInWriter
[bgpcep.git] / bgp / openconfig-rp-statement / src / test / java / org / opendaylight / protocol / bgp / openconfig / routing / policy / statement / MatchAsPathSetTest.java
index 1a4bb8a3c95bb9395d9e2679c3ec84befa6ad02d..a110e634f78f6594567b7c606cfcf5913f499702 100644 (file)
@@ -10,13 +10,8 @@ package org.opendaylight.protocol.bgp.openconfig.routing.policy.statement;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.mockito.Mockito.doReturn;
 import static org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.RouteAttributeContainer.routeAttributeContainerFalse;
-import static org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.ExportAttributeTestUtil.CLUSTER;
-import static org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.ExportAttributeTestUtil.IPV4;
-import static org.opendaylight.protocol.bgp.openconfig.routing.policy.statement.ExportAttributeTestUtil.LOCAL_AS;
 
-import com.google.common.collect.ImmutableMap;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -28,12 +23,9 @@ import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.registry.Rout
 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRouteEntryExportParameters;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.statements.Statement;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4Route;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.AttributesBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.AsPathBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.as.path.SegmentsBuilder;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
 public class MatchAsPathSetTest extends AbstractStatementRegistryConsumerTest {
     @Mock
@@ -52,9 +44,6 @@ public class MatchAsPathSetTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testMatchAsPathAny() {
-        doReturn(new YangInstanceIdentifier.NodeIdentifierWithPredicates(Ipv4Route.QNAME,
-                ImmutableMap.of(QName.create(Ipv4Route.QNAME, "prefix").intern(), "10.3.191.0/22")))
-                .when(this.exportParameters).getRouteId();
         Statement statement = this.basicStatements.stream()
                 .filter(st -> st.getName().equals("reject-match-as-path-any-set")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(
@@ -82,9 +71,6 @@ public class MatchAsPathSetTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testMatchAsPathAll() {
-        doReturn(new YangInstanceIdentifier.NodeIdentifierWithPredicates(Ipv4Route.QNAME,
-                ImmutableMap.of(QName.create(Ipv4Route.QNAME, "prefix").intern(), "10.3.191.0/22")))
-                .when(this.exportParameters).getRouteId();
         Statement statement = this.basicStatements.stream()
                 .filter(st -> st.getName().equals("reject-match-as-path-all-set")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(new AttributesBuilder()
@@ -120,9 +106,6 @@ public class MatchAsPathSetTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testMatchAsPathInverse() {
-        doReturn(new YangInstanceIdentifier.NodeIdentifierWithPredicates(Ipv4Route.QNAME,
-                ImmutableMap.of(QName.create(Ipv4Route.QNAME, "prefix").intern(), "10.3.191.0/22")))
-                .when(this.exportParameters).getRouteId();
         Statement statement = this.basicStatements.stream()
                 .filter(st -> st.getName().equals("reject-match-as-path-inverse-set")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(