BGPCEP-754: Rework EffectiveRibInWriter
[bgpcep.git] / bgp / openconfig-rp-statement / src / test / java / org / opendaylight / protocol / bgp / openconfig / routing / policy / statement / SetExtCommunityTest.java
index 307a1ed191041f41eec97d6e498fe38767528f2f..c53e21c15029d5a2b4ed7fbc6ffa7ce19c06b52c 100644 (file)
@@ -10,12 +10,8 @@ package org.opendaylight.protocol.bgp.openconfig.routing.policy.statement;
 import static org.junit.Assert.assertEquals;
 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 static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.EncapsulationTunnelType.Vxlan;
 
-import com.google.common.collect.ImmutableMap;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -27,7 +23,6 @@ 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.Attributes;
 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.ExtendedCommunitiesBuilder;
@@ -37,8 +32,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.type
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.extended.community.extended.community.EncapsulationCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.extended.community.extended.community.as._4.route.origin.extended.community._case.As4RouteOriginExtendedCommunityBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.extended.community.extended.community.encapsulation._case.EncapsulationExtendedCommunityBuilder;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
 public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
     private final Attributes multipleExtCom = new AttributesBuilder().setExtendedCommunities(Arrays.asList(
@@ -69,9 +62,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testInlineAdd() {
-        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("set-ext-community-inline-add-test")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(
@@ -87,9 +77,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testInlineReplace() {
-        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("set-ext-community-inline-replace-test")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(
@@ -105,9 +92,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testInlineRemove() {
-        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("set-ext-community-inline-remove-test")).findFirst().get();
 
@@ -123,9 +107,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testReferenceAdd() {
-        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("set-ext-community-reference-add-test")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(
@@ -141,9 +122,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testReferenceReplace() {
-        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("set-ext-community-reference-replace-test")).findFirst().get();
         RouteAttributeContainer attributeContainer = routeAttributeContainerFalse(
@@ -159,9 +137,6 @@ public class SetExtCommunityTest extends AbstractStatementRegistryConsumerTest {
 
     @Test
     public void testReferenceRemove() {
-        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("set-ext-community-reference-remove-test")).findFirst().get();