Simplify AbstractStatementRegistryTest 49/94349/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 3 Jan 2021 08:12:33 +0000 (09:12 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 3 Jan 2021 08:13:26 +0000 (09:13 +0100)
All state here can use field initializers, hence remove mucking
with @Before.

Change-Id: I4b583dba9efb97caf578bb8b48885acc37ab56a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/openconfig-rp-spi/src/test/java/org/opendaylight/protocol/bgp/openconfig/routing/policy/spi/AbstractStatementRegistryTest.java

index 6bb21504296452d9436b92fcd5bb190d8fb63975..43ab87989a3b2ef1dec779e6e1ee6c7fc5bd6cb0 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.protocol.bgp.openconfig.routing.policy.spi;
 
 import java.util.List;
 import java.util.concurrent.ExecutionException;
-import org.junit.Before;
 import org.opendaylight.bgpcep.config.loader.routing.policy.AbstractOpenconfigRoutingPolicyLoaderTest;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -27,14 +26,8 @@ public class AbstractStatementRegistryTest extends AbstractOpenconfigRoutingPoli
     public static final long LOCAL_AS = 8;
     public static final Ipv4AddressNoZone IPV4 = new Ipv4AddressNoZone("1.2.3.4");
     public static final ClusterIdentifier CLUSTER = new ClusterIdentifier(IPV4);
-    protected StatementRegistry statementRegistry;
 
-    @Before
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        this.statementRegistry = new StatementRegistry();
-    }
+    protected final StatementRegistry statementRegistry = new StatementRegistry();
 
     protected List<Statement> loadStatement(final String policyName) throws ExecutionException, InterruptedException {
         final ReadWriteTransaction rt = getDataBroker().newReadWriteTransaction();