Fix checkstyle violations in ITs 32/69032/7
authorTom Pantelis <tompantelis@gmail.com>
Sat, 3 Mar 2018 03:51:01 +0000 (22:51 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Mon, 12 Mar 2018 22:27:18 +0000 (18:27 -0400)
Change-Id: I8f65b5b04e2ce67629ed24c07a0f728436c6c6c4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
12 files changed:
commons/it/pom.xml
hwvtepsouthbound/hwvtepsouthbound-it/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/it/HwvtepSouthboundIT.java
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/ovsdbclient/OvsdbClientTestIT.java
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/ovsdbclient/OvsdbClientTestTypedIT.java
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/ovsdbclient/TestBridge.java
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/HardwareVTEPIT.java
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/OpenVSwitchIT.java
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIT.java
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestBase.java
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestUtils.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundITConstants.java

index aa228eaccb710fe548a41ee7fd538f0e38f3a9e7..c33a2389644db7a4a5517976b496c76d076f7050 100644 (file)
@@ -74,6 +74,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.jacoco</groupId>
         <artifactId>jacoco-maven-plugin</artifactId>
index 392d9b7543937a2d886f29881b49b999abceb858..31e01863fe1e0c6fd3e7e9c8bcc10e46bd5505a1 100644 (file)
@@ -81,7 +81,6 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
 
     //Constants
 
-    public static final String ORG_OPS4J_PAX_LOGGING_CFG = "etc/org.ops4j.pax.logging.cfg";
     public static final String CUSTOM_PROPERTIES = "etc/custom.properties";
     public static final String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
     public static final String DEFAULT_SERVER_IPADDRESS = "127.0.0.1";
@@ -104,7 +103,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
     private static int portNumber;
     private static String connectionType;
     private static Node hwvtepNode;
-    @Inject @Filter(timeout=60000)
+    @Inject @Filter(timeout = 60000)
     private static DataBroker dataBroker = null;
     @Inject
     private BundleContext bundleContext;
@@ -112,7 +111,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
     private static final NotifyingDataChangeListener OPERATIONAL_LISTENER =
             new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL);
 
-    private static class NotifyingDataChangeListener implements DataTreeChangeListener<Node> {
+    private static final class NotifyingDataChangeListener implements DataTreeChangeListener<Node> {
         private final LogicalDatastoreType type;
         private final Set<InstanceIdentifier<Node>> createdNodes = new HashSet<>();
         private final Set<InstanceIdentifier<Node>> removedNodes = new HashSet<>();
@@ -127,7 +126,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
             for (DataTreeModification<Node> change : changes) {
                 final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
                 final DataObjectModification<Node> mod = change.getRootNode();
-                    switch (mod.getModificationType()) {
+                switch (mod.getModificationType()) {
                     case DELETE:
                         removedNodes.add(key);
                         break;
@@ -144,7 +143,7 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
                         break;
                     default:
                         throw new IllegalArgumentException("Unhandled modification type " + mod.getModificationType());
-                    }
+                }
             }
         }
 
@@ -227,34 +226,29 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
 
     private Option[] getPropertiesOptions() {
         Properties props = new Properties(System.getProperties());
-        String addressStr = props.getProperty(SERVER_IPADDRESS, DEFAULT_SERVER_IPADDRESS);
+        String ipAddressStr = props.getProperty(SERVER_IPADDRESS, DEFAULT_SERVER_IPADDRESS);
         String portStr = props.getProperty(SERVER_PORT, DEFAULT_SERVER_PORT);
-        String connectionType = props.getProperty(CONNECTION_TYPE, CONNECTION_TYPE_ACTIVE);
+        String connectionTypeStr = props.getProperty(CONNECTION_TYPE, CONNECTION_TYPE_ACTIVE);
 
         LOG.info("getPropertiesOptions: Using the following properties: mode= {}, ip:port= {}:{}",
-                connectionType, addressStr, portStr);
+                connectionTypeStr, ipAddressStr, portStr);
 
         return new Option[] {
-                editConfigurationFilePut(CUSTOM_PROPERTIES, SERVER_IPADDRESS, addressStr),
+                editConfigurationFilePut(CUSTOM_PROPERTIES, SERVER_IPADDRESS, ipAddressStr),
                 editConfigurationFilePut(CUSTOM_PROPERTIES, SERVER_PORT, portStr),
-                editConfigurationFilePut(CUSTOM_PROPERTIES, CONNECTION_TYPE, connectionType),
+                editConfigurationFilePut(CUSTOM_PROPERTIES, CONNECTION_TYPE, connectionTypeStr),
         };
     }
 
     @Before
     @Override
-    public void setup() throws InterruptedException {
+    public void setup() throws Exception {
         if (setup) {
             LOG.info("Skipping setup, already initialized");
             return;
         }
 
-        try {
-            super.setup();
-        } catch (Exception e) {
-            LOG.warn("Failed to setup test", e);
-            fail("Failed to setup test: " + e);
-        }
+        super.setup();
 
         addressStr = bundleContext.getProperty(SERVER_IPADDRESS);
         String portStr = bundleContext.getProperty(SERVER_PORT);
@@ -352,38 +346,38 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
 
     private void waitForOperationalCreation(InstanceIdentifier<Node> iid) throws InterruptedException {
         synchronized (OPERATIONAL_LISTENER) {
-            long _start = System.currentTimeMillis();
+            long start = System.currentTimeMillis();
             LOG.info("Waiting for OPERATIONAL DataChanged creation on {}", iid);
             while (!OPERATIONAL_LISTENER.isCreated(
-                    iid) && System.currentTimeMillis() - _start < OVSDB_ROUNDTRIP_TIMEOUT) {
+                    iid) && System.currentTimeMillis() - start < OVSDB_ROUNDTRIP_TIMEOUT) {
                 OPERATIONAL_LISTENER.wait(OVSDB_UPDATE_TIMEOUT);
             }
-            LOG.info("Woke up, waited {} for creation of {}", System.currentTimeMillis() - _start, iid);
+            LOG.info("Woke up, waited {} for creation of {}", System.currentTimeMillis() - start, iid);
         }
     }
 
     private static void waitForOperationalDeletion(InstanceIdentifier<Node> iid) throws InterruptedException {
         synchronized (OPERATIONAL_LISTENER) {
-            long _start = System.currentTimeMillis();
+            long start = System.currentTimeMillis();
             LOG.info("Waiting for OPERATIONAL DataChanged deletion on {}", iid);
             while (!OPERATIONAL_LISTENER.isRemoved(
-                    iid) && System.currentTimeMillis() - _start < OVSDB_ROUNDTRIP_TIMEOUT) {
+                    iid) && System.currentTimeMillis() - start < OVSDB_ROUNDTRIP_TIMEOUT) {
                 OPERATIONAL_LISTENER.wait(OVSDB_UPDATE_TIMEOUT);
             }
-            LOG.info("Woke up, waited {} for deletion of {}", System.currentTimeMillis() - _start, iid);
+            LOG.info("Woke up, waited {} for deletion of {}", System.currentTimeMillis() - start, iid);
         }
     }
 
-    private ConnectionInfo getConnectionInfo(String addressStr, int portNumber) {
+    private ConnectionInfo getConnectionInfo(String ipAddressStr, int portNum) {
         InetAddress inetAddress = null;
         try {
-            inetAddress = InetAddress.getByName(addressStr);
+            inetAddress = InetAddress.getByName(ipAddressStr);
         } catch (UnknownHostException e) {
-            fail("Could not resolve " + addressStr + ": " + e);
+            fail("Could not resolve " + ipAddressStr + ": " + e);
         }
 
         IpAddress address = HwvtepSouthboundMapper.createIpAddress(inetAddress);
-        PortNumber port = new PortNumber(portNumber);
+        PortNumber port = new PortNumber(portNum);
 
         final ConnectionInfo connectionInfo = new ConnectionInfoBuilder()
                 .setRemoteIp(address)
@@ -398,11 +392,11 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
         private final String psName;
 
 
-        public TestPhysicalSwitch(final ConnectionInfo connectionInfo, String psName) {
+        TestPhysicalSwitch(final ConnectionInfo connectionInfo, String psName) {
             this(connectionInfo, psName, null, null, null, true, null, null, null);
         }
 
-        public TestPhysicalSwitch (final ConnectionInfo connectionInfo, final String name,
+        TestPhysicalSwitch(final ConnectionInfo connectionInfo, final String name,
                         @Nullable InstanceIdentifier<Node> psIid, @Nullable NodeId psNodeId,
                         @Nullable final String description, final boolean setManagedBy,
                         @Nullable final List<ManagementIps> managementIps,
@@ -411,19 +405,19 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
             this.connectionInfo = connectionInfo;
             this.psName = name;
             NodeBuilder psNodeBuilder = new NodeBuilder();
-            if(psIid == null) {
+            if (psIid == null) {
                 psIid = HwvtepSouthboundUtils.createInstanceIdentifier(connectionInfo, new HwvtepNodeName(psName));
             }
-            if(psNodeId == null) {
+            if (psNodeId == null) {
                 psNodeId = HwvtepSouthboundMapper.createManagedNodeId(psIid);
             }
             psNodeBuilder.setNodeId(psNodeId);
             PhysicalSwitchAugmentationBuilder psAugBuilder = new PhysicalSwitchAugmentationBuilder();
             psAugBuilder.setHwvtepNodeName(new HwvtepNodeName(psName));
-            if(description != null) {
+            if (description != null) {
                 psAugBuilder.setHwvtepNodeDescription(description);
             }
-            if(setManagedBy) {
+            if (setManagedBy) {
                 InstanceIdentifier<Node> nodePath = HwvtepSouthboundUtils.createInstanceIdentifier(connectionInfo);
                 psAugBuilder.setManagedBy(new HwvtepGlobalRef(nodePath));
             }
@@ -433,12 +427,12 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
             psNodeBuilder.addAugmentation(PhysicalSwitchAugmentation.class, psAugBuilder.build());
             LOG.debug("Built with intent to store PhysicalSwitch data {}", psAugBuilder.toString());
             Assert.assertTrue(
-                            mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, psIid, psNodeBuilder.build()));
-                    try {
-                        Thread.sleep(OVSDB_UPDATE_TIMEOUT);
-                    } catch (InterruptedException e) {
-                        LOG.warn("Sleep interrupted while waiting for bridge creation (bridge {})", psName, e);
-                    }
+                    mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, psIid, psNodeBuilder.build()));
+            try {
+                Thread.sleep(OVSDB_UPDATE_TIMEOUT);
+            } catch (InterruptedException e) {
+                LOG.warn("Sleep interrupted while waiting for bridge creation (bridge {})", psName, e);
+            }
         }
 
         @Override
@@ -507,9 +501,9 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
 
         try (TestPhysicalSwitch testPSwitch = new TestPhysicalSwitch(connectionInfo, PS_NAME)) {
-            PhysicalSwitchAugmentation pSwitch = getPhysicalSwitch(connectionInfo);
-            Assert.assertNotNull(pSwitch);
-            LOG.info("PhysicalSwitch: {}", pSwitch);
+            PhysicalSwitchAugmentation phySwitch = getPhysicalSwitch(connectionInfo);
+            Assert.assertNotNull(phySwitch);
+            LOG.info("PhysicalSwitch: {}", phySwitch);
         }
     }
 
@@ -533,7 +527,6 @@ public class HwvtepSouthboundIT extends AbstractMdsalTestBase {
     private Node getPhysicalSwitchNode(ConnectionInfo connectionInfo, String psName, LogicalDatastoreType dataStore) {
         InstanceIdentifier<Node> psIid =
                         HwvtepSouthboundUtils.createInstanceIdentifier(connectionInfo, new HwvtepNodeName(psName));
-                return mdsalUtils.read(dataStore, psIid);
+        return mdsalUtils.read(dataStore, psIid);
     }
-
 }
index fd9661cdbfe04a03b1b005135a3867d52ae042a4..b45dd96c1dffe1109ed4b9c3508cb6c6978d5121 100644 (file)
@@ -16,7 +16,6 @@ import static org.junit.Assert.fail;
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
 
 import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.io.IOException;
@@ -67,7 +66,7 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
     /**
      * Test general OVSDB transactions (viz., insert, select, update,
      * mutate, comment, delete, where, commit) as well as the special
-     * transactions (viz., abort and assert)
+     * transactions (viz., abort and assert).
      */
     @Test
     public void testTransact() throws IOException, InterruptedException, ExecutionException {
@@ -99,14 +98,16 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         GenericTableSchema bridge = dbSchema.table("Bridge", GenericTableSchema.class);
 
         List<MonitorRequest> monitorRequests = new ArrayList<>();
-        ColumnSchema<GenericTableSchema, Set<Integer>> flood_vlans = bridge.multiValuedColumn("flood_vlans", Integer.class);
-        ColumnSchema<GenericTableSchema, Map<String, String>> externalIds = bridge.multiValuedColumn("external_ids", String.class, String.class);
+        ColumnSchema<GenericTableSchema, Set<Integer>> floodVlans =
+                bridge.multiValuedColumn("flood_vlans", Integer.class);
+        ColumnSchema<GenericTableSchema, Map<String, String>> externalIds =
+                bridge.multiValuedColumn("external_ids", String.class, String.class);
         ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
         MonitorRequestBuilder<GenericTableSchema> builder = new MonitorRequestBuilder<>(bridge);
         if (filter) {
             builder.addColumn(bridge.column("name"))
                    .addColumn(bridge.column("fail_mode", String.class))
-                   .addColumn(flood_vlans)
+                   .addColumn(floodVlans)
                    .addColumn(externalIds);
         }
         monitorRequests.add(builder.with(new MonitorSelect(true, true, true, true))
@@ -116,15 +117,15 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
 
         TableUpdates updates = ovs.monitor(dbSchema, monitorRequests, new MonitorCallBack() {
             @Override
-            public void update(TableUpdates result, DatabaseSchema dbSchema) {
+            public void update(TableUpdates result, DatabaseSchema unused) {
                 results.add(result);
                 LOG.info("result = {}", result);
             }
 
             @Override
-            public void exception(Throwable t) {
-                results.add(t);
-                LOG.warn("t = ", t);
+            public void exception(Throwable ex) {
+                results.add(ex);
+                LOG.warn("t = ", ex);
             }
         });
         if (updates != null) {
@@ -145,20 +146,21 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         TableUpdate<GenericTableSchema> update = updates.getUpdate(bridge);
         assertTrue(update.getRows().size() > 0);
         for (UUID uuid : update.getRows().keySet()) {
-            Row<GenericTableSchema> aNew = update.getNew(uuid);
-            if (!aNew.getColumn(name).getData().equals(TEST_BRIDGE_NAME)) {
+            Row<GenericTableSchema> row = update.getNew(uuid);
+            if (!row.getColumn(name).getData().equals(TEST_BRIDGE_NAME)) {
                 continue;
             }
             if (filter) {
-                assertEquals(builder.getColumns().size(), aNew.getColumns().size());
+                assertEquals(builder.getColumns().size(), row.getColumns().size());
             } else {
-                // As per RFC7047, Section 4.1.5 : If "columns" is omitted, all columns in the table, except for "_uuid", are monitored.
-                assertEquals(bridge.getColumns().size() - 1, aNew.getColumns().size());
+                // As per RFC7047, Section 4.1.5 : If "columns" is omitted, all columns in the table, except
+                // for "_uuid", are monitored.
+                assertEquals(bridge.getColumns().size() - 1, row.getColumns().size());
             }
-            for (Column<GenericTableSchema, ?> column: aNew.getColumns()) {
-                if (column.getSchema().equals(flood_vlans)) {
+            for (Column<GenericTableSchema, ?> column: row.getColumns()) {
+                if (column.getSchema().equals(floodVlans)) {
                     // Test for the 5 flood_vlans inserted in Bridge br-test in createBridgeTransaction
-                    Set<Integer> data = column.getData(flood_vlans);
+                    Set<Integer> data = column.getData(floodVlans);
                     assertNotNull(data);
                     assertTrue(!data.isEmpty());
                     assertEquals(5, data.size());
@@ -168,14 +170,15 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
                     assertNotNull(data);
                     assertNotNull(data.get("key"));
                     assertEquals("value", data.get("key"));
-                    // Test for {"key2", "value2"} external_ids mutation-inserted in Bridge br-test in createBridgeTransaction
+                    // Test for {"key2", "value2"} external_ids mutation-inserted in Bridge br-test in
+                    // createBridgeTransaction
                     assertNotNull(data.get("key2"));
                     assertEquals("value2", data.get("key2"));
                 }
             }
             return;
         }
-        fail("Bridge being monitored :"+ TEST_BRIDGE_NAME +" Not found");
+        fail("Bridge being monitored :" + TEST_BRIDGE_NAME + " Not found");
     }
 
     /*
@@ -186,11 +189,11 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         assertNotNull(dbSchema);
         GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
 
-        ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
+        ColumnSchema<GenericTableSchema, UUID> uuid = ovsTable.column("_uuid", UUID.class);
 
         List<OperationResult> results = ovs.transactBuilder(dbSchema)
                .add(op.select(ovsTable)
-                      .column(_uuid))
+                      .column(uuid))
                       .execute()
                       .get();
 
@@ -198,7 +201,7 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         OperationResult result = results.get(0);
         List<Row<GenericTableSchema>> rows = result.getRows();
         Row<GenericTableSchema> ovsTableRow = rows.get(0);
-        return ovsTableRow.getColumn(_uuid).getData();
+        return ovsTableRow.getColumn(uuid).getData();
     }
 
     private void createBridgeTransaction() throws IOException, InterruptedException, ExecutionException {
@@ -207,14 +210,15 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
 
         ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
-        ColumnSchema<GenericTableSchema, String> fail_mode = bridge.column("fail_mode", String.class);
-        ColumnSchema<GenericTableSchema, Set<Integer>> flood_vlans = bridge.multiValuedColumn("flood_vlans", Integer.class);
-        ColumnSchema<GenericTableSchema, Map<String, String>> externalIds = bridge.multiValuedColumn("external_ids", String.class, String.class);
+        ColumnSchema<GenericTableSchema, String> failMode = bridge.column("fail_mode", String.class);
+        ColumnSchema<GenericTableSchema, Set<Integer>> floodVlans =
+                bridge.multiValuedColumn("flood_vlans", Integer.class);
+        ColumnSchema<GenericTableSchema, Map<String, String>> externalIds =
+                bridge.multiValuedColumn("external_ids", String.class, String.class);
         ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
-        ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
+        ColumnSchema<GenericTableSchema, UUID> uuid = ovsTable.column("_uuid", UUID.class);
 
         String namedUuid = "br_test";
-        int insertOperationIndex = 0;
         UUID parentTable = selectOpenVSwitchTableUuid();
         TransactionBuilder transactionBuilder = ovs.transactBuilder(dbSchema)
                  /*
@@ -224,20 +228,20 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
                 .add(op.insert(bridge)
                         .withId(namedUuid)
                         .value(name, TEST_BRIDGE_NAME)
-                        .value(flood_vlans, Sets.newHashSet(100, 101, 4001))
+                        .value(floodVlans, Sets.newHashSet(100, 101, 4001))
                         .value(externalIds, ImmutableMap.of("key","value")))
                 .add(op.comment("Inserting Bridge br-int"))
                 .add(op.update(bridge)
-                        .set(fail_mode, "secure")
+                        .set(failMode, "secure")
                         .where(name.opEqual(TEST_BRIDGE_NAME))
                         .build())
                 .add(op.select(bridge)
                         .column(name)
-                        .column(_uuid)
+                        .column(uuid)
                         .where(name.opEqual(TEST_BRIDGE_NAME))
                         .build())
                 .add(op.mutate(bridge)
-                        .addMutation(flood_vlans, Mutator.INSERT, Sets.newHashSet(200,400))
+                        .addMutation(floodVlans, Mutator.INSERT, Sets.newHashSet(200,400))
                         .where(name.opEqual(TEST_BRIDGE_NAME))
                         .build())
                 .add(op.mutate(bridge)
@@ -246,7 +250,7 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
                         .build())
                 .add(op.mutate(ovsTable)
                         .addMutation(bridges, Mutator.INSERT, Collections.singleton(new UUID(namedUuid)))
-                        .where(_uuid.opEqual(parentTable))
+                        .where(uuid.opEqual(parentTable))
                         .build())
                 .add(op.commit(true));
 
@@ -259,6 +263,8 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         for (OperationResult result : operationResults) {
             assertNull(result.getError());
         }
+
+        int insertOperationIndex = 0;
         testBridgeUuid = operationResults.get(insertOperationIndex).getUuid();
     }
 
@@ -313,16 +319,17 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         List<String> dbNames = databases.get();
         assertNotNull(dbNames);
         boolean hasOpenVswitchSchema = false;
-        for(String dbName : dbNames) {
-           if (dbName.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
+        for (String dbName : dbNames) {
+            if (dbName.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
                 hasOpenVswitchSchema = true;
                 break;
-           }
+            }
         }
         assertTrue(LibraryIntegrationTestUtils.OPEN_VSWITCH
                 + " schema is not supported by the switch", hasOpenVswitchSchema);
     }
 
+    @Override
     @Before
     public void setup() throws Exception {
         schema = LibraryIntegrationTestUtils.OPEN_VSWITCH;
@@ -348,7 +355,7 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
         ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
         GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
         ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
-        ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
+        ColumnSchema<GenericTableSchema, UUID> uuid = ovsTable.column("_uuid", UUID.class);
         UUID parentTable = selectOpenVSwitchTableUuid();
 
         ListenableFuture<List<OperationResult>> results = ovs.transactBuilder(dbSchema)
@@ -357,7 +364,7 @@ public class OvsdbClientTestIT extends LibraryIntegrationTestBase {
                         .build())
                 .add(op.mutate(ovsTable)
                         .addMutation(bridges, Mutator.DELETE, Collections.singleton(testBridgeUuid))
-                        .where(_uuid.opEqual(parentTable))
+                        .where(uuid.opEqual(parentTable))
                         .build())
                 .add(op.commit(true))
                 .execute();
index 4c7bafe0b7ac3546dd0eea46a674c74707bc1872..975e403968d3948b5d13314a1a86522b59144932 100644 (file)
@@ -58,20 +58,20 @@ public class OvsdbClientTestTypedIT extends LibraryIntegrationTestBase {
      * are verified.
      */
     @Test
-    public void testTypedBridgeCreate() throws IOException, InterruptedException, ExecutionException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-        TestBridge rBridge = ovs.createTypedRowWrapper(TestBridge.class);
-        rBridge.setName(TEST_BRIDGE_NAME);
-        rBridge.setStatus(ImmutableMap.of("key","value"));
-        rBridge.setFloodVlans(Collections.singleton(34));
+    public void testTypedBridgeCreate() throws IOException, InterruptedException, ExecutionException,
+            NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+        TestBridge testBridge = ovs.createTypedRowWrapper(TestBridge.class);
+        testBridge.setName(TEST_BRIDGE_NAME);
+        testBridge.setStatus(ImmutableMap.of("key","value"));
+        testBridge.setFloodVlans(Collections.singleton(34));
 
         GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
         ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
 
         String namedUuid = "br_test";
-        int insertOperationIndex = 0;
 
         TransactionBuilder transactionBuilder = ovs.transactBuilder(dbSchema)
-                .add(op.insert(rBridge)
+                .add(op.insert(testBridge)
                         .withId(namedUuid))
                 .add(op.mutate(ovsTable)
                         .addMutation(bridges, Mutator.INSERT, Collections.singleton(new UUID(namedUuid))));
@@ -82,6 +82,8 @@ public class OvsdbClientTestTypedIT extends LibraryIntegrationTestBase {
         // Check if Results matches the number of operations in transaction
         assertEquals(transactionBuilder.getOperations().size(), operationResults.size());
         LOG.info("Insert & Update operation results = {}", operationResults);
+
+        int insertOperationIndex = 0;
         testBridgeUuid = operationResults.get(insertOperationIndex).getUuid();
     }
 
@@ -90,16 +92,17 @@ public class OvsdbClientTestTypedIT extends LibraryIntegrationTestBase {
         List<String> dbNames = databases.get();
         assertNotNull(dbNames);
         boolean hasOpenVswitchSchema = false;
-        for(String dbName : dbNames) {
-           if (dbName.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
+        for (String dbName : dbNames) {
+            if (dbName.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
                 hasOpenVswitchSchema = true;
                 break;
-           }
+            }
         }
         assertTrue(LibraryIntegrationTestUtils.OPEN_VSWITCH
                 + " schema is not supported by the switch", hasOpenVswitchSchema);
     }
 
+    @Override
     @Before
     public void setup() throws Exception {
         schema = LibraryIntegrationTestUtils.OPEN_VSWITCH;
index 7f010e2d79c5d753a5498014d91327949d84c7b4..a8a1fc8d63b23fb95ce7394edca0a111ba407145 100644 (file)
@@ -25,7 +25,7 @@ import org.opendaylight.ovsdb.lib.schema.typed.TypedTable;
  * Interface name was set to TestBridge on purpose to test the @TypeTable annotation
  * functionality of TyperHelper.java
  */
-@TypedTable(name="Bridge", database="Open_vSwitch")
+@TypedTable(name = "Bridge", database = "Open_vSwitch")
 public interface TestBridge extends TypedBaseTable {
     /*
      * Its a good practice to set the @TypedColumn to these Statically typed Tables & Columns.
@@ -34,20 +34,21 @@ public interface TestBridge extends TypedBaseTable {
      * The following "name" column is decorated with both GETDATA and GETCOLUMN and the corresponding test
      * will test both the options.
      */
-    @TypedColumn(name="name", method=MethodType.GETDATA)
+    @TypedColumn(name = "name", method = MethodType.GETDATA)
     String getName();
 
-    @TypedColumn(name="name", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "name", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, String> getNameColumn();
 
-    @TypedColumn(name="name", method=MethodType.SETDATA)
+    @TypedColumn(name = "name", method = MethodType.SETDATA)
     void setName(String name);
 
    /*
     * Annotations are NOT added to the Status column on purpose to test the backup
     * functionality on getter, setter, column name derivation etc.  TyperHelper.java.
     */
-   Column<GenericTableSchema, Map<String, String>> getStatusColumn();
+    Column<GenericTableSchema, Map<String, String>> getStatusColumn();
+
     void setStatus(Map<String, String> status);
 
     /*
@@ -55,107 +56,95 @@ public interface TestBridge extends TypedBaseTable {
      * The method name and TypedColumn name was kept different on purpose to test the name
      * resolution priority of TyperHelper.java
      */
-    @TypedColumn(name="flood_vlans", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "flood_vlans", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<Integer>> getFloodVlansColumn();
 
-    @TypedColumn(name="flood_vlans", method=MethodType.SETDATA)
+    @TypedColumn(name = "flood_vlans", method = MethodType.SETDATA)
     void setFloodVlans(Set<Integer> vlans);
 
-
-    @TypedColumn(name="ports", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "ports", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getPortsColumn();
 
-    @TypedColumn(name="ports", method=MethodType.SETDATA)
+    @TypedColumn(name = "ports", method = MethodType.SETDATA)
     void setPorts(Set<UUID> ports);
 
-
-    @TypedColumn(name="mirrors", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "mirrors", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getMirrorsColumn();
 
-    @TypedColumn(name="mirrors", method=MethodType.SETDATA)
+    @TypedColumn(name = "mirrors", method = MethodType.SETDATA)
     void setMirrors(Set<UUID> mirrors);
 
-
-    @TypedColumn(name="controller", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "controller", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getControllerColumn();
 
-    @TypedColumn(name="controller", method=MethodType.SETDATA)
+    @TypedColumn(name = "controller", method = MethodType.SETDATA)
     void setController(Set<UUID> controller);
 
-
-    @TypedColumn(name="datapath_id", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "datapath_id", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<String>> getDatapathIdColumn();
 
-    @TypedColumn(name="datapath_id", method=MethodType.SETDATA)
+    @TypedColumn(name = "datapath_id", method = MethodType.SETDATA)
     void setDatapathId(Set<String> datapathId);
 
-
-    @TypedColumn(name="datapath_type", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "datapath_type", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, String> getDatapathTypeColumn();
 
-    @TypedColumn(name="datapath_type", method=MethodType.SETDATA)
+    @TypedColumn(name = "datapath_type", method = MethodType.SETDATA)
     void setDatapathType(String datapathType);
 
-
-    @TypedColumn(name="fail_mode", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "fail_mode", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<String>> getFailModeColumn();
 
-    @TypedColumn(name="fail_mode", method=MethodType.SETDATA)
+    @TypedColumn(name = "fail_mode", method = MethodType.SETDATA)
     void setFailMode(Set<String> failMode);
 
-
-    @TypedColumn(name="sflow", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "sflow", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getSflowColumn();
 
-    @TypedColumn(name="sflow", method=MethodType.SETDATA)
+    @TypedColumn(name = "sflow", method = MethodType.SETDATA)
     void setSflow(Set<UUID> sflow);
 
-
-    @TypedColumn(name="netflow", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "netflow", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getNetflowColumn();
 
-    @TypedColumn(name="netflow", method=MethodType.SETDATA)
+    @TypedColumn(name = "netflow", method = MethodType.SETDATA)
     void setNetflow(Set<UUID> netflow);
 
-
-    @TypedColumn(name="flow_tables", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "flow_tables", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Map<Integer, UUID>> getFlowTablesColumn();
 
-    @TypedColumn(name="flow_tables", method=MethodType.SETDATA)
+    @TypedColumn(name = "flow_tables", method = MethodType.SETDATA)
     void setFlowTables(Map<Integer, UUID> flowTables);
 
-
-    @TypedColumn(name="stp_enable", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "stp_enable", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Boolean> getStpEnableColumn();
 
-    @TypedColumn(name="stp_enable", method=MethodType.SETDATA)
+    @TypedColumn(name = "stp_enable", method = MethodType.SETDATA)
+    @SuppressWarnings("checkstyle:ParameterName")
     void setStpEnable(Boolean stp_enable);
 
-
-    @TypedColumn(name="protocols", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "protocols", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<String>> getProtocolsColumn();
 
-    @TypedColumn(name="protocols", method=MethodType.SETDATA)
+    @TypedColumn(name = "protocols", method = MethodType.SETDATA)
     void setProtocols(Set<String> protocols);
 
-
-    @TypedColumn(name="other_config", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "other_config", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Map<String, String>> getOtherConfigColumn();
 
-    @TypedColumn(name="other_config", method=MethodType.SETDATA)
+    @TypedColumn(name = "other_config", method = MethodType.SETDATA)
+    @SuppressWarnings("checkstyle:ParameterName")
     void setOtherConfig(Map<String, String> other_config);
 
-
-    @TypedColumn(name="external_ids", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "external_ids", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Map<String, String>> getExternalIdsColumn();
 
-    @TypedColumn(name="external_ids", method=MethodType.SETDATA)
+    @TypedColumn(name = "external_ids", method = MethodType.SETDATA)
     void setExternalIds(Map<String, String> externalIds);
 
-
-    @TypedColumn(name="ipfix", method=MethodType.GETCOLUMN)
+    @TypedColumn(name = "ipfix", method = MethodType.GETCOLUMN)
     Column<GenericTableSchema, Set<UUID>> getIpfixColumn();
 
-    @TypedColumn(name="ipfix", method=MethodType.SETDATA)
+    @TypedColumn(name = "ipfix", method = MethodType.SETDATA)
     void setIpfix(Set<UUID> ipfix);
 }
index 99e271f97e942caa5f9af602a85d68d1c4e1a243..8e96c2948ac2d96f32d12c1b46c5912d1d4f6200 100644 (file)
@@ -38,10 +38,12 @@ import org.slf4j.LoggerFactory;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
-public class HardwareVTEPIT  extends LibraryIntegrationTestBase {
+@SuppressWarnings("checkstyle:AbbreviationAsWordInName")
+public class HardwareVTEPIT extends LibraryIntegrationTestBase {
     private static final Logger LOG = LoggerFactory.getLogger(HardwareVTEPIT.class);
     private UUID testManagerUuid = null;
 
+    @Override
     @Before
     public void setup() throws Exception {
         schema = LibraryIntegrationTestUtils.HARDWARE_VTEP;
@@ -61,10 +63,10 @@ public class HardwareVTEPIT  extends LibraryIntegrationTestBase {
 
     /**
      * Create a new manager string in addition to whatever is already there
-     * Will modify the Global table to include the UUID to the new Manager row
+     * Will modify the Global table to include the UUID to the new Manager row.
      */
     @SuppressWarnings("unchecked")
-    public void managerInsert () throws ExecutionException, InterruptedException {
+    public void managerInsert() throws ExecutionException, InterruptedException {
         //Ensure test only proceeds if HW VTEP is supported
         assumeTrue(isSchemaSupported(getClient(), LibraryIntegrationTestUtils.HARDWARE_VTEP));
 
@@ -105,7 +107,7 @@ public class HardwareVTEPIT  extends LibraryIntegrationTestBase {
         assertNotNull(getGlobalTableUuid(getClient(), getTableCache()));
     }
 
-    public void managerDelete () throws ExecutionException, InterruptedException {
+    public void managerDelete() throws ExecutionException, InterruptedException {
         assumeTrue(isSchemaSupported(getClient(), LibraryIntegrationTestUtils.HARDWARE_VTEP));
 
         Manager manager = getClient().getTypedRowWrapper(Manager.class, null);
@@ -126,7 +128,7 @@ public class HardwareVTEPIT  extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testManager () throws ExecutionException, InterruptedException {
+    public void testManager() throws ExecutionException, InterruptedException {
         managerInsert();
         managerDelete();
     }
index 45f32600cecf2c1ae416ba956c6c1c89200d8ec0..6aef9b620ddb52d9edbd7431ebc261d90bc4c9cd 100644 (file)
@@ -43,8 +43,8 @@ import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
 import org.opendaylight.ovsdb.schema.openvswitch.Controller;
 import org.opendaylight.ovsdb.schema.openvswitch.FlowSampleCollectorSet;
 import org.opendaylight.ovsdb.schema.openvswitch.FlowTable;
-import org.opendaylight.ovsdb.schema.openvswitch.Interface;
 import org.opendaylight.ovsdb.schema.openvswitch.IPFIX;
+import org.opendaylight.ovsdb.schema.openvswitch.Interface;
 import org.opendaylight.ovsdb.schema.openvswitch.Manager;
 import org.opendaylight.ovsdb.schema.openvswitch.Mirror;
 import org.opendaylight.ovsdb.schema.openvswitch.NetFlow;
@@ -82,21 +82,22 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     private UUID testSFlowUuid = null;
     private UUID testSslUuid = null;
     private UUID testAutoattachUuid = null;
-    private Version flowSampleCollectorSetFromVersion = Version.fromString("7.1.0");
-    private Version flowTableFromVersion = Version.fromString("6.5.0");
-    private Version prefixesAddedVersion = Version.fromString("7.4.0");
-    private Version externalIdAddedVerson = Version.fromString("7.5.0");
-    private Version ipfixFromVersion = Version.fromString("7.1.0");
-    private Version ipfixCacheFromVersion = Version.fromString("7.3.0");
-    private Version autoAttachFromVersion = Version.fromString("7.11.2");
-
+    private final Version flowSampleCollectorSetFromVersion = Version.fromString("7.1.0");
+    private final Version flowTableFromVersion = Version.fromString("6.5.0");
+    private final Version prefixesAddedVersion = Version.fromString("7.4.0");
+    private final Version externalIdAddedVerson = Version.fromString("7.5.0");
+    private final Version ipfixFromVersion = Version.fromString("7.1.0");
+    private final Version ipfixCacheFromVersion = Version.fromString("7.3.0");
+    private final Version autoAttachFromVersion = Version.fromString("7.11.2");
+
+    @Override
     @Before
     public void setup() throws Exception {
         schema = LibraryIntegrationTestUtils.OPEN_VSWITCH;
         super.setup();
     }
 
-    public UUID getOpenVSwitchTableUuid (OvsdbClient ovs, Map<String, Map<UUID, Row>> tableCache) {
+    public UUID getOpenVSwitchTableUuid(OvsdbClient ovs, Map<String, Map<UUID, Row>> tableCache) {
         OpenVSwitch openVSwitch = getClient().getTypedRowWrapper(OpenVSwitch.class, null);
         Map<UUID, Row> ovsTable = tableCache.get(openVSwitch.getSchema().getName());
         if (ovsTable != null) {
@@ -107,7 +108,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         return null;
     }
 
-    public UUID bridgeInsert () throws ExecutionException, InterruptedException {
+    public UUID bridgeInsert() throws ExecutionException, InterruptedException {
         Bridge bridge = getClient().createTypedRowWrapper(Bridge.class);
         bridge.setName(TEST_BRIDGE_NAME);
         bridge.setStatus(ImmutableMap.of("key", "value"));
@@ -140,7 +141,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         return bridgeUuid;
     }
 
-    public void bridgeDelete (UUID bridgeUuid) throws ExecutionException, InterruptedException {
+    public void bridgeDelete(UUID bridgeUuid) throws ExecutionException, InterruptedException {
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         OpenVSwitch openVSwitch = getClient().getTypedRowWrapper(OpenVSwitch.class, null);
 
@@ -160,7 +161,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
     @Test
     @SuppressWarnings("unchecked")
-    public void testBridge () throws ExecutionException, InterruptedException {
+    public void testBridge() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
 
         // Verify that the local cache was updated with the remote changes
@@ -173,7 +174,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    private void controllerInsert () throws ExecutionException, InterruptedException {
+    private void controllerInsert() throws ExecutionException, InterruptedException {
         String controllerUuidStr = "controller";
         Controller controller1 = getClient().createTypedRowWrapper(Controller.class);
         controller1.setTarget("tcp:1.1.1.1:6640");
@@ -236,7 +237,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(2, monitoredBridge.getControllerColumn().getData().size());
     }
 
-    private void controllerDelete () throws ExecutionException, InterruptedException {
+    private void controllerDelete() throws ExecutionException, InterruptedException {
         Controller controller = getClient().getTypedRowWrapper(Controller.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH).get();
@@ -269,7 +270,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testController () throws ExecutionException, InterruptedException {
+    public void testController() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         controllerInsert();
         controllerDelete();
@@ -277,7 +278,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test(expected = SchemaVersionMismatchException.class)
-    public void testFlowSampleCollectorSetTableNotSupported () {
+    public void testFlowSampleCollectorSetTableNotSupported() {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowSampleCollectorSetFromVersion) < 0);
 
@@ -285,7 +286,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void flowSampleCollectorSetInsert () throws ExecutionException, InterruptedException {
+    public void flowSampleCollectorSetInsert() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowSampleCollectorSetFromVersion) >= 0);
 
@@ -316,14 +317,15 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
                 monitoredflowSampleCollectorSet.getIdColumn().getData());
     }
 
-    public void flowSampleCollectorSetDelete () throws ExecutionException, InterruptedException {
+    public void flowSampleCollectorSetDelete() throws ExecutionException, InterruptedException {
         assumeTrue(schemaVersion.compareTo(flowSampleCollectorSetFromVersion) >= 0);
 
-        FlowSampleCollectorSet flowSampleCollectorSet = getClient().getTypedRowWrapper(FlowSampleCollectorSet.class, null);
+        FlowSampleCollectorSet flowSampleCollectorSet =
+                getClient().getTypedRowWrapper(FlowSampleCollectorSet.class, null);
         TransactionBuilder transactionBuilder = getClient().transactBuilder(getDbSchema())
                 .add(op.delete(flowSampleCollectorSet.getSchema())
-                        .where(flowSampleCollectorSet.getUuidColumn().getSchema().opEqual(testFlowSampleCollectorSetUuid))
-                        .build())
+                    .where(flowSampleCollectorSet.getUuidColumn().getSchema().opEqual(testFlowSampleCollectorSetUuid))
+                    .build())
                 .add(op.comment("FlowSampleCollectorSet: Deleting " + testFlowSampleCollectorSetUuid))
                 .add(op.commit(true));
 
@@ -331,7 +333,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testFlowSampleCollectorSet () throws ExecutionException, InterruptedException {
+    public void testFlowSampleCollectorSet() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowSampleCollectorSetFromVersion) >= 0);
 
@@ -342,7 +344,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test(expected = SchemaVersionMismatchException.class)
-    public void testFlowTableTableNotSupported () {
+    public void testFlowTableTableNotSupported() {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowTableFromVersion) < 0);
 
@@ -350,28 +352,27 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void flowTableInsert () throws ExecutionException, InterruptedException {
+    public void flowTableInsert() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowTableFromVersion) >= 0);
 
         String flowTableUuidStr = "testFlowTable";
         String tableName = "flow_table_row_name";
         String overflowPolicy = "evict";
-        String groups = "group name";
         String prefixes = "wildcarding prefixes";
-        Long flowLimit = 50000L;
         Map<Long, UUID> flowTableBrRef = new HashMap<>();
         flowTableBrRef.put(1L, new UUID(flowTableUuidStr));
         FlowTable flowTable = getClient().createTypedRowWrapper(FlowTable.class);
         flowTable.setName(ImmutableSet.of(tableName));
         flowTable.setOverflowPolicy(ImmutableSet.of(overflowPolicy));
-        flowTable.setGroups(ImmutableSet.of(groups));
+        flowTable.setGroups(ImmutableSet.of("group name"));
         if (schemaVersion.compareTo(prefixesAddedVersion) >= 0) {
             flowTable.setPrefixes(ImmutableSet.of(prefixes));
         }
         if (schemaVersion.compareTo(externalIdAddedVerson) >= 0) {
             flowTable.setExternalIds(ImmutableMap.of("I <3", "OVS"));
         }
+        Long flowLimit = 50000L;
         flowTable.setFlowLimit(ImmutableSet.of(flowLimit));
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
 
@@ -396,7 +397,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(flowTable.getNameColumn().getData(), monitoredFlowTable.getNameColumn().getData());
     }
 
-    public void flowTableDelete () throws ExecutionException, InterruptedException {
+    public void flowTableDelete() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowTableFromVersion) >= 0);
 
@@ -418,18 +419,18 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void setTestFlowTableSet () throws ExecutionException, InterruptedException {
+    public void setTestFlowTableSet() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(flowTableFromVersion) >= 0);
 
-        UUID testBridgeUuid = bridgeInsert();
+        UUID bridgeUuid = bridgeInsert();
         flowTableInsert();
         flowTableDelete();
-        bridgeDelete(testBridgeUuid);
+        bridgeDelete(bridgeUuid);
     }
 
     @Test(expected = SchemaVersionMismatchException.class)
-    public void testIpfixTableNotSupported () {
+    public void testIpfixTableNotSupported() {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(ipfixFromVersion) < 0);
 
@@ -437,17 +438,15 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void ipfixInsert () throws ExecutionException, InterruptedException {
+    public void ipfixInsert() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(ipfixFromVersion) >= 0);
 
-        String ipfixUuidStr = "testIpfix";
         String ipfixTarget = "172.16.20.1:4739";
         Long obsDomainId = 112L;
         Long obsPointId = 358L;
         Long cacheMax = 132L;
         Long cacheTimeout = 134L;
-        Long sampling = 558L;
 
         IPFIX ipfix = getClient().createTypedRowWrapper(IPFIX.class);
         ipfix.setTargets(ImmutableSet.of(ipfixTarget));
@@ -458,10 +457,13 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
             ipfix.setCacheMaxFlows(ImmutableSet.of(cacheMax));
             ipfix.setCacheActiveTimeout(ImmutableSet.of(cacheTimeout));
         }
+
+        Long sampling = 558L;
         ipfix.setSampling(ImmutableSet.of(sampling));
         ipfix.setExternalIds(ImmutableMap.of("I <3", "ovs"));
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
 
+        String ipfixUuidStr = "testIpfix";
         TransactionBuilder transactionBuilder = getClient().transactBuilder(getDbSchema())
                 .add(op.insert(ipfix)
                         .withId(ipfixUuidStr))
@@ -480,11 +482,11 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
         // Verify that the local cache was updated with the remote changes
         Row ipfixRow = getTableCache().get(ipfix.getSchema().getName()).get(testIpfixUuid);
-        IPFIX monitoredIPFIX = getClient().getTypedRowWrapper(IPFIX.class, ipfixRow);
-        assertEquals(testIpfixUuid, monitoredIPFIX.getUuidColumn().getData());
+        IPFIX monitoredIPFix = getClient().getTypedRowWrapper(IPFIX.class, ipfixRow);
+        assertEquals(testIpfixUuid, monitoredIPFix.getUuidColumn().getData());
     }
 
-    public void ipfixDelete () throws ExecutionException, InterruptedException {
+    public void ipfixDelete() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(ipfixFromVersion) >= 0);
 
@@ -506,7 +508,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testIpfix () throws ExecutionException, InterruptedException {
+    public void testIpfix() throws ExecutionException, InterruptedException {
         // Don't run this test if the table is not supported
         assumeTrue(schemaVersion.compareTo(ipfixFromVersion) >= 0);
 
@@ -553,7 +555,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(externalIds, monitoredManager.getExternalIdsColumn().getData());
     }
 
-    public void managerDelete () throws ExecutionException, InterruptedException {
+    public void managerDelete() throws ExecutionException, InterruptedException {
         Manager manager = getClient().getTypedRowWrapper(Manager.class, null);
         OpenVSwitch openVSwitch = getClient().getTypedRowWrapper(OpenVSwitch.class, null);
 
@@ -572,13 +574,13 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testManager () throws ExecutionException, InterruptedException {
+    public void testManager() throws ExecutionException, InterruptedException {
         managerInsert();
         managerDelete();
     }
 
     @SuppressWarnings("unchecked")
-    public void mirrorInsert () throws ExecutionException, InterruptedException {
+    public void mirrorInsert() throws ExecutionException, InterruptedException {
         String mirrorUuidStr = "testMirror";
         String mirrorName = "my_name_is_mirror";
         Long outputVid = 1024L;
@@ -616,7 +618,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(mirror.getExternalIdsColumn().getData(), monitoredMirror.getExternalIdsColumn().getData());
     }
 
-    private void mirrorDelete () throws ExecutionException, InterruptedException {
+    private void mirrorDelete() throws ExecutionException, InterruptedException {
         Mirror mirror = getClient().getTypedRowWrapper(Mirror.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH).get();
@@ -636,7 +638,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testMirror () throws ExecutionException, InterruptedException {
+    public void testMirror() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         mirrorInsert();
         mirrorDelete();
@@ -644,7 +646,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void netFlowInsert () throws ExecutionException, InterruptedException {
+    public void netFlowInsert() throws ExecutionException, InterruptedException {
         String netFlowUuidStr = "testNetFlow";
         String netFlowTargets = "172.16.20.200:6343";
         Long engineType = 128L;
@@ -684,7 +686,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(netFlow.getExternalIdsColumn().getData(), monitoredNetFlow.getExternalIdsColumn().getData());
     }
 
-    private void netFlowDelete () throws ExecutionException, InterruptedException {
+    private void netFlowDelete() throws ExecutionException, InterruptedException {
         NetFlow netFlow = getClient().getTypedRowWrapper(NetFlow.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH).get();
@@ -704,7 +706,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testNetFlow () throws ExecutionException, InterruptedException {
+    public void testNetFlow() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         netFlowInsert();
         netFlowDelete();
@@ -712,10 +714,8 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void portAndInterfaceInsert () throws ExecutionException, InterruptedException {
-        String portUuidStr = "testPort";
+    public void portAndInterfaceInsert() throws ExecutionException, InterruptedException {
         String intfUuidStr = "testIntf";
-        String tunnelEncap = "vxlan";
         Port port = getClient().createTypedRowWrapper(Port.class);
         port.setName("testPort");
         port.setTag(ImmutableSet.of(1L));
@@ -724,7 +724,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
         Interface intf = getClient().createTypedRowWrapper(Interface.class);
         intf.setName(port.getNameColumn().getData());
-        intf.setType(tunnelEncap);
+        intf.setType("vxlan");
         intf.setExternalIds(ImmutableMap.of("vm-id", "12345abcedf78910"));
         // For per Flow TEPs use remote_ip=flow
         // For per Port TEPs use remote_ip=x.x.x.x (ipv4)
@@ -733,6 +733,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
                 "key", "flow",
                 "dst_port", "8472"));
 
+        String portUuidStr = "testPort";
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         TransactionBuilder transactionBuilder = getClient().transactBuilder(getDbSchema())
                 .add(op.insert(port.getSchema())
@@ -759,7 +760,8 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
                         .build())
                 .add(op.comment("Interface: Updating " + intfUuidStr))
                 .add(op.mutate(bridge.getSchema())
-                        .addMutation(bridge.getPortsColumn().getSchema(), Mutator.INSERT, Collections.singleton(new UUID(portUuidStr)))
+                        .addMutation(bridge.getPortsColumn().getSchema(), Mutator.INSERT,
+                                Collections.singleton(new UUID(portUuidStr)))
                         .where(bridge.getNameColumn().getSchema().opEqual(TEST_BRIDGE_NAME))
                         .build())
                 .add(op.comment("Bridge: Mutating " + TEST_BRIDGE_NAME));
@@ -781,7 +783,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(intf.getNameColumn().getData(), monitoredInterface.getNameColumn().getData());
     }
 
-    private void portAndInterfaceDelete () throws ExecutionException, InterruptedException {
+    private void portAndInterfaceDelete() throws ExecutionException, InterruptedException {
         Port port = getClient().getTypedRowWrapper(Port.class, null);
         Interface intf = getClient().getTypedRowWrapper(Interface.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
@@ -806,7 +808,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testPortAndInterface () throws ExecutionException, InterruptedException {
+    public void testPortAndInterface() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         portAndInterfaceInsert();
         portAndInterfaceDelete();
@@ -888,7 +890,6 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
     @SuppressWarnings("unchecked")
     public void qosInsert() throws ExecutionException, InterruptedException {
-        String portUuidStr = "testQosPortUuid";
         String intfUuidStr = "testQosIntfUuid";
         String qosUuidStr = "testQosUuid";
         String qosPort = "testQosPort";
@@ -910,6 +911,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
 
+        String portUuidStr = "testQosPortUuid";
         TransactionBuilder transactionBuilder = getClient().transactBuilder(getDbSchema())
                 .add(op.insert(port.getSchema())
                         .withId(portUuidStr)
@@ -942,13 +944,13 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
 
         int insertPortOperationIndex = 0;
         int insertInterfaceOperationIndex = 2;
-        int insertQosOperationIndex = 4;
         List<OperationResult> operationResults = executeTransaction(transactionBuilder,
                 "Insert and Mutate operation results for Port and Interface");
         testPortUuid = operationResults.get(insertPortOperationIndex).getUuid();
         assertNotNull(ASSERT_TRANS_UUID, testPortUuid);
         testInterfaceUuid = operationResults.get(insertInterfaceOperationIndex).getUuid();
         assertNotNull(ASSERT_TRANS_UUID, testInterfaceUuid);
+        int insertQosOperationIndex = 4;
         testQosUuid = operationResults.get(insertQosOperationIndex).getUuid();
         assertNotNull(ASSERT_TRANS_UUID, testQosUuid);
 
@@ -966,7 +968,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(qos.getTypeColumn().getData(), monitoredQos.getTypeColumn().getData());
     }
 
-    private void qosDelete () throws ExecutionException, InterruptedException {
+    private void qosDelete() throws ExecutionException, InterruptedException {
         Port port = getClient().getTypedRowWrapper(Port.class, null);
         Interface intf = getClient().getTypedRowWrapper(Interface.class, null);
         Qos qos = getClient().getTypedRowWrapper(Qos.class, null);
@@ -1000,7 +1002,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testQos () throws ExecutionException, InterruptedException {
+    public void testQos() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         qosInsert();
         qosDelete();
@@ -1059,7 +1061,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(queue.getExternalIdsColumn().getData(), monitoredQueue.getExternalIdsColumn().getData());
     }
 
-    private void queueDelete () throws ExecutionException, InterruptedException {
+    private void queueDelete() throws ExecutionException, InterruptedException {
         Queue queue = getClient().getTypedRowWrapper(Queue.class, null);
         Qos qos = getClient().getTypedRowWrapper(Qos.class, null);
         DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH).get();
@@ -1079,7 +1081,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testQueue () throws ExecutionException, InterruptedException {
+    public void testQueue() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         qosInsert();
         queueInsert();
@@ -1089,36 +1091,36 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void sFlowInsert () throws ExecutionException, InterruptedException {
-        String sFlowUuidStr = "testSFlow";
-        String sFlowTarget = "172.16.20.200:6343";
+    public void sFlowInsert() throws ExecutionException, InterruptedException {
         Long header = 128L;
         Long obsPointId = 358L;
-        Long polling =10L;
+        Long polling = 10L;
         String agent = "172.16.20.210";
         Long sampling = 64L;
-        SFlow sFlow = getClient().createTypedRowWrapper(SFlow.class);
-        sFlow.setTargets(ImmutableSet.of(sFlowTarget));
-        sFlow.setHeader(ImmutableSet.of(header));
-        sFlow.setPolling(ImmutableSet.of(obsPointId));
-        sFlow.setPolling(ImmutableSet.of(polling));
-        sFlow.setAgent(ImmutableSet.of(agent));
-        sFlow.setSampling(ImmutableSet.of(sampling));
-        sFlow.setExternalIds(ImmutableMap.of("kit", "tah"));
+        SFlow sflow = getClient().createTypedRowWrapper(SFlow.class);
+        sflow.setTargets(ImmutableSet.of("172.16.20.200:6343"));
+        sflow.setHeader(ImmutableSet.of(header));
+        sflow.setPolling(ImmutableSet.of(obsPointId));
+        sflow.setPolling(ImmutableSet.of(polling));
+        sflow.setAgent(ImmutableSet.of(agent));
+        sflow.setSampling(ImmutableSet.of(sampling));
+        sflow.setExternalIds(ImmutableMap.of("kit", "tah"));
+
+        String sflowUuidStr = "testSFlow";
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         TransactionBuilder transactionBuilder = getClient().transactBuilder(getDbSchema())
-                .add(op.insert(sFlow.getSchema())
-                        .withId(sFlowUuidStr)
-                        .value(sFlow.getTargetsColumn())
-                        .value(sFlow.getHeaderColumn())
-                        .value(sFlow.getPollingColumn())
-                        .value(sFlow.getAgentColumn())
-                        .value(sFlow.getSamplingColumn())
-                        .value(sFlow.getExternalIdsColumn()))
-                .add(op.comment("sFlow: Inserting " + sFlowUuidStr))
+                .add(op.insert(sflow.getSchema())
+                        .withId(sflowUuidStr)
+                        .value(sflow.getTargetsColumn())
+                        .value(sflow.getHeaderColumn())
+                        .value(sflow.getPollingColumn())
+                        .value(sflow.getAgentColumn())
+                        .value(sflow.getSamplingColumn())
+                        .value(sflow.getExternalIdsColumn()))
+                .add(op.comment("sFlow: Inserting " + sflowUuidStr))
                 .add(op.mutate(bridge.getSchema())
                         .addMutation(bridge.getSflowColumn().getSchema(), Mutator.INSERT,
-                                Collections.singleton(new UUID(sFlowUuidStr)))
+                                Collections.singleton(new UUID(sflowUuidStr)))
                         .where(bridge.getNameColumn().getSchema().opEqual(TEST_BRIDGE_NAME))
                         .build())
                 .add(op.comment("Bridge: Mutating " + TEST_BRIDGE_NAME));
@@ -1129,19 +1131,19 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertNotNull(ASSERT_TRANS_UUID, testSFlowUuid);
 
         // Verify that the local cache was updated with the remote changes
-        Row sFlowRow = getTableCache().get(sFlow.getSchema().getName()).get(testSFlowUuid);
-        Queue monitoredSFlow = getClient().getTypedRowWrapper(Queue.class, sFlowRow);
-        assertEquals(sFlow.getExternalIdsColumn().getData(), monitoredSFlow.getExternalIdsColumn().getData());
+        Row sflowRow = getTableCache().get(sflow.getSchema().getName()).get(testSFlowUuid);
+        Queue monitoredSFlow = getClient().getTypedRowWrapper(Queue.class, sflowRow);
+        assertEquals(sflow.getExternalIdsColumn().getData(), monitoredSFlow.getExternalIdsColumn().getData());
     }
 
-    private void sFlowDelete () throws ExecutionException, InterruptedException {
-        SFlow sFlow = getClient().getTypedRowWrapper(SFlow.class, null);
+    private void sFlowDelete() throws ExecutionException, InterruptedException {
+        SFlow sflow = getClient().getTypedRowWrapper(SFlow.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
         DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
-                .add(op.delete(sFlow.getSchema())
-                        .where(sFlow.getUuidColumn().getSchema().opEqual(testSFlowUuid))
+                .add(op.delete(sflow.getSchema())
+                        .where(sflow.getUuidColumn().getSchema().opEqual(testSFlowUuid))
                         .build())
                 .add(op.comment("SFlow: Deleting " + testSFlowUuid))
                 .add(op.mutate(bridge.getSchema()) // Delete an sflow column in the Bridge table
@@ -1154,7 +1156,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testSFlow () throws ExecutionException, InterruptedException {
+    public void testSFlow() throws ExecutionException, InterruptedException {
         testBridgeUuid = bridgeInsert();
         sFlowInsert();
         sFlowDelete();
@@ -1162,7 +1164,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @SuppressWarnings("unchecked")
-    public void sslInsert () throws ExecutionException, InterruptedException {
+    public void sslInsert() throws ExecutionException, InterruptedException {
 
         String sslUuidStr = "sslUuidName";
         String caCert = "PARC";
@@ -1206,7 +1208,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
         assertEquals(ssl.getExternalIdsColumn().getData(), monitoredSsl.getExternalIdsColumn().getData());
     }
 
-    public void sslDelete () throws ExecutionException, InterruptedException {
+    public void sslDelete() throws ExecutionException, InterruptedException {
         SSL ssl = getClient().getTypedRowWrapper(SSL.class, null);
         OpenVSwitch openVSwitch = getClient().getTypedRowWrapper(OpenVSwitch.class, null);
 
@@ -1225,13 +1227,13 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testSsl () throws ExecutionException, InterruptedException {
+    public void testSsl() throws ExecutionException, InterruptedException {
         sslInsert();
         sslDelete();
     }
 
     @Test
-    public void testTyperUtilsSpecialMethodsToString () {
+    public void testTyperUtilsSpecialMethodsToString() {
         Bridge bridge = getClient().createTypedRowWrapper(Bridge.class);
         assertNotNull(bridge);
         bridge.setName(TEST_BRIDGE_NAME);
@@ -1244,7 +1246,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testTyperUtilsSpecialMethodsEquals () {
+    public void testTyperUtilsSpecialMethodsEquals() {
         Bridge bridge = getClient().createTypedRowWrapper(Bridge.class);
         assertNotNull(bridge);
         bridge.setName(TEST_BRIDGE_NAME);
@@ -1274,7 +1276,7 @@ public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     }
 
     @Test
-    public void testTyperUtilsSpecialMethodsHashCode () {
+    public void testTyperUtilsSpecialMethodsHashCode() {
         Bridge bridge = getClient().createTypedRowWrapper(Bridge.class);
 
         assertNotNull(bridge);
index 9afa559e164a4865e5693903191ac8d699c40b45..41022ff5ba605a13636ec27affc9ce32b8a24f14 100644 (file)
@@ -13,12 +13,13 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -36,9 +37,6 @@ import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.util.concurrent.ListenableFuture;
-
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class LibraryIT extends LibraryIntegrationTestBase {
@@ -46,6 +44,7 @@ public class LibraryIT extends LibraryIntegrationTestBase {
     private static final String TEST_BRIDGE_NAME = "br_test";
     private static UUID testBridgeUuid = null;
 
+    @Override
     @Before
     public void setup() throws Exception {
         schema = LibraryIntegrationTestUtils.OPEN_VSWITCH;
@@ -63,8 +62,6 @@ public class LibraryIT extends LibraryIntegrationTestBase {
         OpenVSwitch openVSwitch = ovsdbClient.createTypedRowWrapper(OpenVSwitch.class);
         openVSwitch.setBridges(Collections.singleton(new UUID(TEST_BRIDGE_NAME)));
 
-        int insertOperationIndex = 0;
-
         TransactionBuilder transactionBuilder = ovsdbClient.transactBuilder(dbSchema)
                 .add(op.insert(bridge.getSchema())
                         .withId(TEST_BRIDGE_NAME)
@@ -87,6 +84,8 @@ public class LibraryIT extends LibraryIntegrationTestBase {
         for (OperationResult result : operationResults) {
             assertNull(result.getError());
         }
+
+        int insertOperationIndex = 0;
         testBridgeUuid = operationResults.get(insertOperationIndex).getUuid();
         assertNotNull(testBridgeUuid);
     }
index 16bc631a22e213cfe2e68e2249048e3f17481dfc..b116c94b6f5b4a4eeb2485fea5ca23af2793c307 100644 (file)
@@ -12,7 +12,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.maven;
@@ -29,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
@@ -65,7 +65,9 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
     protected static final String ASSERT_TRANS_OPERATION_COUNT = "Transaction should match number of operations";
     protected static final String ASSERT_TRANS_UUID = "Transaction UUID should not be null";
     protected static Version schemaVersion;
+    protected static DatabaseSchema dbSchema;
     private static boolean schemaSupported = false;
+    private static AtomicBoolean setup = new AtomicBoolean(false);
     protected static OvsdbClient ovsdbClient;
     private static Map<String, Map<UUID, Row>> tableCache = new HashMap<>();
     private static boolean monitorReady = false;
@@ -75,16 +77,14 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
         return tableCache;
     }
 
-    protected OvsdbClient getClient () {
+    protected OvsdbClient getClient() {
         return ovsdbClient;
     }
 
-    protected static DatabaseSchema dbSchema;
-    protected DatabaseSchema getDbSchema () {
+    protected DatabaseSchema getDbSchema() {
         return dbSchema;
     }
 
-    private static AtomicBoolean setup = new AtomicBoolean(false);
     protected static boolean getSetup() {
         return setup.get();
     }
@@ -152,7 +152,7 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
 
     protected BindingAwareBroker.ProviderContext getProviderContext() {
         BindingAwareBroker.ProviderContext providerContext = null;
-        for (int i=0; i < 60; i++) {
+        for (int i = 0; i < 60; i++) {
             LOG.info("Looking for ProviderContext, try {}", i);
             providerContext = getSession();
             if (providerContext != null) {
@@ -175,55 +175,54 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
         return providerContext;
     }
 
-    public boolean checkSchema (String schema) {
+    public boolean checkSchema(String schemaStr)
+            throws IOException, InterruptedException, ExecutionException, TimeoutException {
         if (schemaSupported) {
-            LOG.info("Schema ({}) is supported", schema);
+            LOG.info("Schema ({}) is supported", schemaStr);
             return true;
         }
-        try {
-            ovsdbClient = LibraryIntegrationTestUtils.getTestConnection(this);
-            assertNotNull("Invalid Client. Check connection params", ovsdbClient);
-            if (isSchemaSupported(ovsdbClient, schema)) {
-                dbSchema = ovsdbClient.getSchema(schema).get();
-                assertNotNull(dbSchema);
-                LOG.info("{} schema in {} with tables: {}",
-                        schema, ovsdbClient.getConnectionInfo(), dbSchema.getTables());
-                schemaSupported = true;
-                return true;
-            }
-        } catch (Exception e) {
-            fail("Exception: " + e);
+
+        ovsdbClient = LibraryIntegrationTestUtils.getTestConnection(this);
+        assertNotNull("Invalid Client. Check connection params", ovsdbClient);
+        if (isSchemaSupported(ovsdbClient, schemaStr)) {
+            dbSchema = ovsdbClient.getSchema(schemaStr).get();
+            assertNotNull(dbSchema);
+            LOG.info("{} schema in {} with tables: {}",
+                    schemaStr, ovsdbClient.getConnectionInfo(), dbSchema.getTables());
+            schemaSupported = true;
+            return true;
         }
 
-        LOG.info("Schema ({}) is not supported", schema);
+        LOG.info("Schema ({}) is not supported", schemaStr);
         return false;
     }
 
-    public boolean isSchemaSupported (String schema) throws ExecutionException,
+    public boolean isSchemaSupported(String schemaStr) throws ExecutionException,
             InterruptedException {
-        return isSchemaSupported(ovsdbClient, schema);
+        return isSchemaSupported(ovsdbClient, schemaStr);
     }
 
-    public boolean isSchemaSupported (OvsdbClient client, String schema) throws ExecutionException, InterruptedException {
+    public boolean isSchemaSupported(OvsdbClient client, String schemaStr)
+            throws ExecutionException, InterruptedException {
         ListenableFuture<List<String>> databases = client.getDatabases();
         List<String> dbNames = databases.get();
         assertNotNull(dbNames);
-        return dbNames.contains(schema);
+        return dbNames.contains(schemaStr);
     }
 
     /**
-     * As per RFC 7047, section 4.1.5, if a Monitor request is sent without any columns, the update response will not include
-     * the _uuid column.
-     * ----------------------------------------------------------------------------------------------------------------------------------
-     * Each &lt;monitor-request&gt; specifies one or more columns and the manner in which the columns (or the entire table) are to be monitored.
-     * The "columns" member specifies the columns whose values are monitored. It MUST NOT contain duplicates.
-     * If "columns" is omitted, all columns in the table, except for "_uuid", are monitored.
-     * ----------------------------------------------------------------------------------------------------------------------------------
+     * As per RFC 7047, section 4.1.5, if a Monitor request is sent without any columns, the update response will
+     * not include the _uuid column.
+     * ---------------------------------------------------------------------------------------------------------------
+     * Each &lt;monitor-request&gt; specifies one or more columns and the manner in which the columns (or the entire
+     * table) are to be monitored. The "columns" member specifies the columns whose values are monitored. It MUST NOT
+     * contain duplicates. If "columns" is omitted, all columns in the table, except for "_uuid", are monitored.
+     * ---------------------------------------------------------------------------------------------------------------
      * In order to overcome this limitation, this method
      *
      * @return MonitorRequest that includes all the Bridge Columns including _uuid
      */
-    public <T extends TypedBaseTable<GenericTableSchema>> MonitorRequest getAllColumnsMonitorRequest (Class <T> klazz) {
+    public <T extends TypedBaseTable<GenericTableSchema>> MonitorRequest getAllColumnsMonitorRequest(Class<T> klazz) {
         TypedBaseTable<GenericTableSchema> table = getClient().createTypedRowWrapper(klazz);
         GenericTableSchema tableSchema = table.getSchema();
         Set<String> columns = tableSchema.getColumns();
@@ -234,7 +233,7 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
         return bridgeBuilder.with(new MonitorSelect(true, true, true, true)).build();
     }
 
-    public <T extends TableSchema<T>> MonitorRequest getAllColumnsMonitorRequest (T tableSchema) {
+    public <T extends TableSchema<T>> MonitorRequest getAllColumnsMonitorRequest(T tableSchema) {
         Set<String> columns = tableSchema.getColumns();
         MonitorRequestBuilder<T> monitorBuilder = new MonitorRequestBuilder<>(tableSchema);
         for (String column : columns) {
@@ -243,7 +242,7 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
         return monitorBuilder.with(new MonitorSelect(true, true, true, true)).build();
     }
 
-    public boolean monitorTables () throws ExecutionException, InterruptedException, IOException {
+    public boolean monitorTables() throws ExecutionException, InterruptedException, IOException {
         if (monitorReady) {
             LOG.info("Monitoring is already initialized.");
             return monitorReady;
@@ -271,23 +270,23 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
     @SuppressWarnings("unchecked")
     protected void updateTableCache(TableUpdates updates) {
         for (String tableName : updates.getUpdates().keySet()) {
-            Map<UUID, Row> tUpdate = getTableCache().get(tableName);
+            Map<UUID, Row> rowUpdates = getTableCache().get(tableName);
             TableUpdate update = updates.getUpdates().get(tableName);
             for (UUID uuid : (Set<UUID>)update.getRows().keySet()) {
                 if (update.getNew(uuid) != null) {
-                    if (tUpdate == null) {
-                        tUpdate = new HashMap<>();
-                        getTableCache().put(tableName, tUpdate);
+                    if (rowUpdates == null) {
+                        rowUpdates = new HashMap<>();
+                        getTableCache().put(tableName, rowUpdates);
                     }
-                    tUpdate.put(uuid, update.getNew(uuid));
+                    rowUpdates.put(uuid, update.getNew(uuid));
                 } else {
-                    tUpdate.remove(uuid);
+                    rowUpdates.remove(uuid);
                 }
             }
         }
     }
 
-    public List<OperationResult> executeTransaction (TransactionBuilder transactionBuilder, String text)
+    public List<OperationResult> executeTransaction(TransactionBuilder transactionBuilder, String text)
             throws ExecutionException, InterruptedException {
         ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
         List<OperationResult> operationResults = results.get();
@@ -301,18 +300,14 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
         return operationResults;
     }
 
+    @Override
     public void setup() throws Exception {
         if (getSetup()) {
             LOG.info("Skipping setUp, already initialized");
             return;
         }
 
-        try {
-            super.setup();
-        } catch (Exception e) {
-            LOG.warn("Failed to setup test", e);
-            fail("Failed to setup test: " + e);
-        }
+        super.setup();
 
         assertNotNull("ProviderContext was not found", getProviderContext());
         if (schema.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
@@ -332,12 +327,7 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
             return;
         }
 
-        try {
-            super.setup();
-        } catch (Exception e) {
-            LOG.warn("Failed to setup test", e);
-            fail("Failed to setup test: " + e);
-        }
+        super.setup();
 
         assertNotNull("ProviderContext was not found", getProviderContext());
         setSetup(true);
@@ -345,13 +335,13 @@ public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
 
     private class UpdateMonitor implements MonitorCallBack {
         @Override
-        public void update(TableUpdates result, DatabaseSchema dbSchema) {
+        public void update(TableUpdates result, DatabaseSchema unused) {
             updateTableCache(result);
         }
 
         @Override
-        public void exception(Throwable t) {
-            LOG.error("Exception t = " + t);
+        public void exception(Throwable ex) {
+            LOG.error("Exception t = " + ex);
         }
     }
 }
index e1b9e799c32064e6ef5c84d273222e1a21d14a12..2aa6fc4c6d34f7442b4a1c01f73621b5e941b8c2 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.lib.it;
 
 import java.io.IOException;
 import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.Objects;
 import java.util.Properties;
 import java.util.concurrent.Callable;
@@ -19,7 +20,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
 import org.opendaylight.ovsdb.lib.OvsdbConnection;
@@ -36,8 +36,8 @@ public final class LibraryIntegrationTestUtils {
     public static final String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
     public static final String SERVER_PORT = "ovsdbserver.port";
     public static final String CONNECTION_TYPE = "ovsdbserver.connection";
-    public final static String OPEN_VSWITCH = "Open_vSwitch";
-    public final static String HARDWARE_VTEP = "hardware_vtep";
+    public static final String OPEN_VSWITCH = "Open_vSwitch";
+    public static final String HARDWARE_VTEP = "hardware_vtep";
     private static final String CONNECTION_TYPE_ACTIVE = "active";
     private static final String CONNECTION_TYPE_PASSIVE = "passive";
     private static final String DEFAULT_SERVER_PORT = "6640";
@@ -65,7 +65,7 @@ public final class LibraryIntegrationTestUtils {
             InetAddress address;
             try {
                 address = InetAddress.getByName(addressStr);
-            } catch (Exception e) {
+            } catch (UnknownHostException e) {
                 LOG.warn("Unable to resolve {}", addressStr, e);
                 return null;
             }
@@ -99,6 +99,7 @@ public final class LibraryIntegrationTestUtils {
 
     private static class PassiveListener implements Callable<OvsdbClient>, OvsdbConnectionListener {
         OvsdbClient client = null;
+
         @Override
         public OvsdbClient call() throws Exception {
             OvsdbConnection connection = (OvsdbConnection)ServiceHelper.getGlobalInstance(OvsdbConnection.class, this);
@@ -110,13 +111,13 @@ public final class LibraryIntegrationTestUtils {
         }
 
         @Override
-        public void connected(OvsdbClient client) {
-            this.client = client;
+        public void connected(OvsdbClient newClient) {
+            this.client = newClient;
         }
 
         @Override
-        public void disconnected(OvsdbClient client) {
-            if (!Objects.equals(this.client.getConnectionInfo(), client.getConnectionInfo())) {
+        public void disconnected(OvsdbClient newClient) {
+            if (!Objects.equals(this.client.getConnectionInfo(), newClient.getConnectionInfo())) {
                 throw new IllegalStateException("disconnected unexpected client");
             }
             this.client = null;
index 6cac3784e711b23ea0563c1633b08492af11a509..790b73875a19c519de588910763924584b0ec6f9 100644 (file)
@@ -154,7 +154,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Integration tests for southbound-impl
+ * Integration tests for southbound-impl.
  *
  * @author Sam Hague (shague@redhat.com)
  */
@@ -178,7 +178,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     private static Node ovsdbNode;
     private static int testMethodsRemaining;
     private static Version schemaVersion;
-    @Inject @Filter(timeout=60000)
+    @Inject @Filter(timeout = 60000)
     private static DataBroker dataBroker = null;
 
     @Inject
@@ -190,13 +190,14 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL);
 
 
-    private static class NotifyingDataChangeListener implements DataTreeChangeListener<DataObject> {
+    private static final class NotifyingDataChangeListener implements DataTreeChangeListener<DataObject> {
+        private static final int RETRY_WAIT = 100;
+
         private final LogicalDatastoreType type;
         private final Set<InstanceIdentifier<?>> createdIids = new HashSet<>();
         private final Set<InstanceIdentifier<?>> removedIids = new HashSet<>();
         private final Set<InstanceIdentifier<?>> updatedIids = new HashSet<>();
         private final InstanceIdentifier<?> iid;
-        private final int RETRY_WAIT = 100;
 
         private NotifyingDataChangeListener(LogicalDatastoreType type) {
             this.type = type;
@@ -241,21 +242,21 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 }
             }
 
-            synchronized(this) {
+            synchronized (this) {
                 notifyAll();
             }
         }
 
-        public boolean isCreated(InstanceIdentifier<?> iid) {
-            return createdIids.remove(iid);
+        public boolean isCreated(InstanceIdentifier<?> path) {
+            return createdIids.remove(path);
         }
 
-        public boolean isRemoved(InstanceIdentifier<?> iid) {
-            return removedIids.remove(iid);
+        public boolean isRemoved(InstanceIdentifier<?> path) {
+            return removedIids.remove(path);
         }
 
-        public boolean isUpdated(InstanceIdentifier<?> iid) {
-            return updatedIids.remove(iid);
+        public boolean isUpdated(InstanceIdentifier<?> path) {
+            return updatedIids.remove(path);
         }
 
         public void clear() {
@@ -271,34 +272,34 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
         public void waitForCreation(long timeout) throws InterruptedException {
             synchronized (this) {
-                long _start = System.currentTimeMillis();
+                long start = System.currentTimeMillis();
                 LOG.info("Waiting for {} DataChanged creation on {}", type, iid);
-                while (!isCreated(iid) && System.currentTimeMillis() - _start < timeout) {
+                while (!isCreated(iid) && System.currentTimeMillis() - start < timeout) {
                     wait(RETRY_WAIT);
                 }
-                LOG.info("Woke up, waited {}ms for creation of {}", System.currentTimeMillis() - _start, iid);
+                LOG.info("Woke up, waited {}ms for creation of {}", System.currentTimeMillis() - start, iid);
             }
         }
 
         public void waitForDeletion(long timeout) throws InterruptedException {
             synchronized (this) {
-                long _start = System.currentTimeMillis();
+                long start = System.currentTimeMillis();
                 LOG.info("Waiting for {} DataChanged deletion on {}", type, iid);
-                while (!isRemoved(iid) && System.currentTimeMillis() - _start < timeout) {
+                while (!isRemoved(iid) && System.currentTimeMillis() - start < timeout) {
                     wait(RETRY_WAIT);
                 }
-                LOG.info("Woke up, waited {}ms for deletion of {}", System.currentTimeMillis() - _start, iid);
+                LOG.info("Woke up, waited {}ms for deletion of {}", System.currentTimeMillis() - start, iid);
             }
         }
 
         public void waitForUpdate(long timeout) throws InterruptedException {
             synchronized (this) {
-                long _start = System.currentTimeMillis();
+                long start = System.currentTimeMillis();
                 LOG.info("Waiting for {} DataChanged update on {}", type, iid);
-                while (!isUpdated(iid) && System.currentTimeMillis() - _start < timeout) {
+                while (!isUpdated(iid) && System.currentTimeMillis() - start < timeout) {
                     wait(RETRY_WAIT);
                 }
-                LOG.info("Woke up, waited {}ms for update of {}", System.currentTimeMillis() - _start, iid);
+                LOG.info("Woke up, waited {}ms for update of {}", System.currentTimeMillis() - start, iid);
             }
         }
     }
@@ -366,15 +367,15 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private Option[] getPropertiesOptions() {
         Properties props = new Properties(System.getProperties());
-        String addressStr = props.getProperty(SouthboundITConstants.SERVER_IPADDRESS,
+        String ipAddressStr = props.getProperty(SouthboundITConstants.SERVER_IPADDRESS,
                 SouthboundITConstants.DEFAULT_SERVER_IPADDRESS);
         String portStr = props.getProperty(SouthboundITConstants.SERVER_PORT,
                 SouthboundITConstants.DEFAULT_SERVER_PORT);
-        String connectionType = props.getProperty(SouthboundITConstants.CONNECTION_TYPE,
+        String connectionTypeStr = props.getProperty(SouthboundITConstants.CONNECTION_TYPE,
                 SouthboundITConstants.CONNECTION_TYPE_ACTIVE);
 
         LOG.info("getPropertiesOptions: Using the following properties: mode= {}, ip:port= {}:{}",
-                connectionType, addressStr, portStr);
+                connectionTypeStr, ipAddressStr, portStr);
 
         return new Option[] {
                 propagateSystemProperties(
@@ -382,27 +383,23 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                         SouthboundITConstants.SERVER_PORT,
                         SouthboundITConstants.CONNECTION_TYPE),
                 editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
-                        SouthboundITConstants.SERVER_IPADDRESS, addressStr),
+                        SouthboundITConstants.SERVER_IPADDRESS, ipAddressStr),
                 editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
                         SouthboundITConstants.SERVER_PORT, portStr),
                 editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
-                        SouthboundITConstants.CONNECTION_TYPE, connectionType),
+                        SouthboundITConstants.CONNECTION_TYPE, connectionTypeStr),
         };
     }
 
     @Before
     @Override
-    public void setup() throws InterruptedException {
+    public void setup() throws Exception {
         if (setup) {
             LOG.info("Skipping setup, already initialized");
             return;
         }
 
-        try {
-            super.setup();
-        } catch (Exception e) {
-            LOG.warn("Failed to setup test", e);
-        }
+        super.setup();
         Assert.assertNotNull("db should not be null", dataBroker);
 
         LOG.info("sleeping for 10s to let the features finish installing");
@@ -502,8 +499,6 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     /**
      * Test passive connection mode. The southbound starts in a listening mode waiting for connections on port
      * 6640. This test will wait for incoming connections for {@link SouthboundITConstants#CONNECTION_INIT_TIMEOUT} ms.
-     *
-     * @throws InterruptedException
      */
     @Test
     public void testPassiveNode() throws InterruptedException {
@@ -513,16 +508,16 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         }
     }
 
-    private static ConnectionInfo getConnectionInfo(final String addressStr, final int portNumber) {
+    private static ConnectionInfo getConnectionInfo(final String ipAddressStr, final int portNum) {
         InetAddress inetAddress = null;
         try {
-            inetAddress = InetAddress.getByName(addressStr);
+            inetAddress = InetAddress.getByName(ipAddressStr);
         } catch (UnknownHostException e) {
-            fail("Could not resolve " + addressStr + ": " + e);
+            fail("Could not resolve " + ipAddressStr + ": " + e);
         }
 
         IpAddress address = SouthboundMapper.createIpAddress(inetAddress);
-        PortNumber port = new PortNumber(portNumber);
+        PortNumber port = new PortNumber(portNum);
 
         final ConnectionInfo connectionInfo = new ConnectionInfoBuilder()
                 .setRemoteIp(address)
@@ -574,37 +569,37 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private void waitForOperationalCreation(InstanceIdentifier<Node> iid) throws InterruptedException {
         synchronized (OPERATIONAL_LISTENER) {
-            long _start = System.currentTimeMillis();
+            long start = System.currentTimeMillis();
             LOG.info("Waiting for OPERATIONAL DataChanged creation on {}", iid);
             while (!OPERATIONAL_LISTENER.isCreated(
-                    iid) && System.currentTimeMillis() - _start < OVSDB_ROUNDTRIP_TIMEOUT) {
+                    iid) && System.currentTimeMillis() - start < OVSDB_ROUNDTRIP_TIMEOUT) {
                 OPERATIONAL_LISTENER.wait(OVSDB_UPDATE_TIMEOUT);
             }
-            LOG.info("Woke up, waited {} for creation of {}", System.currentTimeMillis() - _start, iid);
+            LOG.info("Woke up, waited {} for creation of {}", System.currentTimeMillis() - start, iid);
         }
     }
 
     private static void waitForOperationalDeletion(InstanceIdentifier<Node> iid) throws InterruptedException {
         synchronized (OPERATIONAL_LISTENER) {
-            long _start = System.currentTimeMillis();
+            long start = System.currentTimeMillis();
             LOG.info("Waiting for OPERATIONAL DataChanged deletion on {}", iid);
             while (!OPERATIONAL_LISTENER.isRemoved(
-                    iid) && System.currentTimeMillis() - _start < OVSDB_ROUNDTRIP_TIMEOUT) {
+                    iid) && System.currentTimeMillis() - start < OVSDB_ROUNDTRIP_TIMEOUT) {
                 OPERATIONAL_LISTENER.wait(OVSDB_UPDATE_TIMEOUT);
             }
-            LOG.info("Woke up, waited {} for deletion of {}", System.currentTimeMillis() - _start, iid);
+            LOG.info("Woke up, waited {} for deletion of {}", System.currentTimeMillis() - start, iid);
         }
     }
 
     private void waitForOperationalUpdate(InstanceIdentifier<Node> iid) throws InterruptedException {
         synchronized (OPERATIONAL_LISTENER) {
-            long _start = System.currentTimeMillis();
+            long start = System.currentTimeMillis();
             LOG.info("Waiting for OPERATIONAL DataChanged update on {}", iid);
             while (!OPERATIONAL_LISTENER.isUpdated(
-                    iid) && System.currentTimeMillis() - _start < OVSDB_ROUNDTRIP_TIMEOUT) {
+                    iid) && System.currentTimeMillis() - start < OVSDB_ROUNDTRIP_TIMEOUT) {
                 OPERATIONAL_LISTENER.wait(OVSDB_UPDATE_TIMEOUT);
             }
-            LOG.info("Woke up, waited {} for update of {}", System.currentTimeMillis() - _start, iid);
+            LOG.info("Woke up, waited {} for update of {}", System.currentTimeMillis() - start, iid);
         }
     }
 
@@ -658,7 +653,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                         //dpdkTypes.add("dpdkvhost");
 
                         for (String dpdkType : dpdkTypes) {
-                            String testPortname = "test"+dpdkType+"port";
+                            String testPortname = "test" + dpdkType + "port";
                             LOG.info("DPDK portname and type is {}, {}", testPortname, dpdkType);
                             Class<? extends InterfaceTypeBase> dpdkIfType = SouthboundConstants.OVSDB_INTERFACE_TYPE_MAP
                                     .get(dpdkType);
@@ -677,7 +672,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
                         // Verify that each termination point has the specific DPDK ifType
                         for (String dpdkType : dpdkTypes) {
-                            String testPortname = "test"+dpdkType+"port";
+                            String testPortname = "test" + dpdkType + "port";
                             Class<? extends InterfaceTypeBase> dpdkIfType = SouthboundConstants.OVSDB_INTERFACE_TYPE_MAP
                                     .get(dpdkType);
                             List<TerminationPoint> terminationPoints = terminationPointNode.getTerminationPoint();
@@ -854,7 +849,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          * @param externalIds The external identifiers if any.
          * @param otherConfigs The other configuration items if any.
          */
-        public TestBridge(final ConnectionInfo connectionInfo, @Nullable InstanceIdentifier<Node> bridgeIid,
+        TestBridge(final ConnectionInfo connectionInfo, @Nullable InstanceIdentifier<Node> bridgeIid,
                                   final String bridgeName, NodeId bridgeNodeId, final boolean setProtocolEntries,
                                   final Class<? extends OvsdbFailModeBase> failMode, final boolean setManagedBy,
                                   @Nullable final Class<? extends DatapathTypeBase> dpType,
@@ -895,7 +890,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             }
         }
 
-        public TestBridge(final ConnectionInfo connectionInfo, final String bridgeName) {
+        TestBridge(final ConnectionInfo connectionInfo, final String bridgeName) {
             this(connectionInfo, null, bridgeName, null, true,
                     SouthboundConstants.OVSDB_FAIL_MODE_MAP.inverse().get("secure"), true, null, null, null, null);
         }
@@ -918,7 +913,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         private final Uri autoattachId;
         private final Uri bridgeId;
 
-        public TestAutoAttach (final ConnectionInfo connectionInfo,
+        TestAutoAttach(final ConnectionInfo connectionInfo,
                 final Uri autoattachId,
                 final Uri bridgeId,
                 @Nullable final String systemName,
@@ -951,6 +946,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 LOG.warn("Sleep interrupted while waiting for queue {}", iid, e);
             }
         }
+
         @Override
         public void close() {
             final InstanceIdentifier<Autoattach> iid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
@@ -988,7 +984,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             NodeId nodeId = SouthboundUtils.createManagedNodeId(SouthboundUtils.createInstanceIdentifier(
                     connectionInfo, bridge.getBridgeName()));
             String bridgeId = nodeId.getValue();
-            try(TestAutoAttach testAutoattach = new TestAutoAttach(connectionInfo, new Uri(testAutoattachId),
+            try (TestAutoAttach testAutoattach = new TestAutoAttach(connectionInfo, new Uri(testAutoattachId),
                     new Uri(bridgeId), testSystemName, testSystemDescription, null, null)) {
                 // READ: Read md-sal operational datastore to see if the AutoAttach table was created
                 // and if Bridge table was updated with AutoAttach Uuid
@@ -1009,7 +1005,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 Assert.assertEquals(aaUuid, bridge.getAutoAttach());
 
                 // UPDATE: Update mappings column of AutoAttach table that was created
-                List<Mappings> mappings = ImmutableList.of(new MappingsBuilder().setMappingsKey(100L).setMappingsValue(200).build());
+                List<Mappings> mappings = ImmutableList.of(new MappingsBuilder().setMappingsKey(100L)
+                        .setMappingsValue(200).build());
                 Autoattach updatedAa = new AutoattachBuilder()
                         .setAutoattachId(new Uri(testAutoattachId))
                         .setMappings(mappings)
@@ -1043,8 +1040,10 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 Assert.assertNotNull(operAa);
                 List<Mappings> operMappingsList = operAa.getMappings();
                 for (Mappings operMappings: operMappingsList) {
-                    Assert.assertEquals(mappings.get(operMappingsList.indexOf(operMappings)).getMappingsKey(), operMappings.getMappingsKey());
-                    Assert.assertEquals(mappings.get(operMappingsList.indexOf(operMappings)).getMappingsValue(), operMappings.getMappingsValue());
+                    Assert.assertEquals(mappings.get(operMappingsList.indexOf(operMappings))
+                            .getMappingsKey(), operMappings.getMappingsKey());
+                    Assert.assertEquals(mappings.get(operMappingsList.indexOf(operMappings))
+                            .getMappingsValue(), operMappings.getMappingsValue());
                 }
                 List<AutoattachExternalIds> operExternalIds = operAa.getAutoattachExternalIds();
                 externalIds.add(new AutoattachExternalIdsBuilder()
@@ -1052,10 +1051,10 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                         .setAutoattachExternalIdValue(operAa.getAutoattachId().getValue())
                         .build());
                 for (AutoattachExternalIds operExternalId : operExternalIds) {
-                    Assert.assertEquals(externalIds.get(operExternalIds.indexOf(operExternalId)).getAutoattachExternalIdKey(),
-                            operExternalId.getAutoattachExternalIdKey());
-                    Assert.assertEquals(externalIds.get(operExternalIds.indexOf(operExternalId)).getAutoattachExternalIdValue(),
-                            operExternalId.getAutoattachExternalIdValue());
+                    Assert.assertEquals(externalIds.get(operExternalIds.indexOf(operExternalId))
+                            .getAutoattachExternalIdKey(), operExternalId.getAutoattachExternalIdKey());
+                    Assert.assertEquals(externalIds.get(operExternalIds.indexOf(operExternalId))
+                            .getAutoattachExternalIdValue(), operExternalId.getAutoattachExternalIdValue());
                 }
 
                 // DELETE: Delete AutoAttach table
@@ -1067,8 +1066,6 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 Assert.assertNull(operAa);
             } catch (AssumptionViolatedException e) {
                 LOG.warn("Skipped test for Autoattach due to unsupported schema", e);
-            } catch (Exception e) {
-                fail("Unexpected exception in CRUD test for Autoattach table for schema:" + schemaVersion.toString() +". " + e);
             }
         }
     }
@@ -1098,7 +1095,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          * @param externalIds The external identifiers if any.
          * @param otherConfigs The other configuration items if any.
          */
-        public TestQos(final ConnectionInfo connectionInfo,
+        TestQos(final ConnectionInfo connectionInfo,
                                   final Uri qosId,
                                   final Class<? extends QosTypeBase> qosType,
                                   @Nullable final List<QosExternalIds> externalIds,
@@ -1152,7 +1149,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     private static class TestQueue implements AutoCloseable {
         private final ConnectionInfo connectionInfo;
         private final Uri queueId;
-        private final InstanceIdentifier<Queues> qIid;
+        private final InstanceIdentifier<Queues> queueIid;
 
         /**
          * Creates a test queue entry which can be automatically removed when no longer necessary.
@@ -1163,7 +1160,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          * @param externalIds The external identifiers if any.
          * @param otherConfigs The other configuration items if any.
          */
-        public TestQueue(final ConnectionInfo connectionInfo,
+        TestQueue(final ConnectionInfo connectionInfo,
                                   final Uri queueId,
                                   final Short queueDscp,
                                   @Nullable final List<QueuesExternalIds> externalIds,
@@ -1177,16 +1174,16 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 .setQueuesExternalIds(externalIds)
                 .setQueuesOtherConfig(otherConfigs)
                 .build();
-            qIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
+            queueIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
                     .child(Queues.class, queue.getKey());
             final NotifyingDataChangeListener queueOperationalListener =
-                    new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, qIid);
+                    new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, queueIid);
             queueOperationalListener.registerDataChangeListener();
 
             Assert.assertTrue(
                     mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION,
-                    qIid, queue));
+                    queueIid, queue));
 
             try {
                 queueOperationalListener.waitForCreation(OVSDB_ROUNDTRIP_TIMEOUT);
@@ -1196,18 +1193,19 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         }
 
         public InstanceIdentifier<Queues> getInstanceIdentifier() {
-            return qIid;
+            return queueIid;
         }
+
         @Override
         public void close() {
-            InstanceIdentifier<Queues> qIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
+            InstanceIdentifier<Queues> queuesIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
                     .augmentation(OvsdbNodeAugmentation.class)
                     .child(Queues.class, new QueuesKey(this.queueId));
             final NotifyingDataChangeListener queueOperationalListener =
-                    new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, qIid);
+                    new NotifyingDataChangeListener(LogicalDatastoreType.OPERATIONAL, queuesIid);
             queueOperationalListener.registerDataChangeListener();
 
-            Assert.assertTrue(mdsalUtils.delete(LogicalDatastoreType.CONFIGURATION, qIid));
+            Assert.assertTrue(mdsalUtils.delete(LogicalDatastoreType.CONFIGURATION, queuesIid));
             try {
                 queueOperationalListener.waitForDeletion(OVSDB_ROUNDTRIP_TIMEOUT);
             } catch (InterruptedException e) {
@@ -1249,7 +1247,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     /**
      * extract the <code>LogicalDataStoreType.OPERATIONAL</code> type data store contents for the particular bridge
-     * identified by <code>bridgeName</code>
+     * identified by <code>bridgeName</code>.
      *
      * @param connectionInfo the connection information
      * @param bridgeName the bridge name
@@ -1262,7 +1260,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     /**
      * Extract the node contents from <code>store</code> type data store for the
-     * bridge identified by <code>bridgeName</code>
+     * bridge identified by <code>bridgeName</code>.
      *
      * @param connectionInfo the connection information
      * @param bridgeName the bridge name
@@ -1277,7 +1275,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     /**
      * Extract the node contents from <code>LogicalDataStoreType.OPERATIONAL</code> data store for the
-     * bridge identified by <code>bridgeName</code>
+     * bridge identified by <code>bridgeName</code>.
      *
      * @param connectionInfo the connection information
      * @param bridgeName the bridge name
@@ -1304,7 +1302,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     /**
      * Extracts the <code>TerminationPointAugmentation</code> for the <code>index</code> <code>TerminationPoint</code>
-     * on <code>bridgeName</code>
+     * on <code>bridgeName</code>.
      *
      * @param connectionInfo the connection information
      * @param bridgeName the bridge name
@@ -1363,7 +1361,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testCRDTerminationPointOfPort() throws InterruptedException {
-        final Long OFPORT_EXPECTED = 45002L;
+        final Long ofportExpected = 45002L;
 
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
 
@@ -1379,7 +1377,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             String portName = "testOfPort";
             ovsdbTerminationBuilder.setName(portName);
 
-            ovsdbTerminationBuilder.setOfport(OFPORT_EXPECTED);
+            ovsdbTerminationBuilder.setOfport(ofportExpected);
             Assert.assertTrue(addTerminationPoint(nodeId, portName, ovsdbTerminationBuilder));
             InstanceIdentifier<Node> terminationPointIid = getTpIid(connectionInfo, bridge);
             Node terminationPointNode = mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, terminationPointIid);
@@ -1393,14 +1391,14 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     Long ofPort = ovsdbTerminationPointAugmentation.getOfport();
                     // if ephemeral port 45002 is in use, ofPort is set to 1
-                    Assert.assertTrue(ofPort.equals(OFPORT_EXPECTED) || ofPort.equals(1L));
+                    Assert.assertTrue(ofPort.equals(ofportExpected) || ofPort.equals(1L));
                     LOG.info("ofPort: {}", ofPort);
                 }
             }
 
             // UPDATE- Not Applicable.  From the OpenVSwitch Documentation:
-            //   "A client should ideally set this column’s value in the same database transaction that it uses to create
-            //   the interface."
+            //   "A client should ideally set this column’s value in the same database transaction that it uses to
+            //   create the interface."
 
             // DELETE handled by TestBridge
         }
@@ -1408,8 +1406,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testCRDTerminationPointOfPortRequest() throws InterruptedException {
-        final Long OFPORT_EXPECTED = 45008L;
-        final Long OFPORT_INPUT = 45008L;
+        final Long ofportExpected = 45008L;
+        final Long ofportInput = 45008L;
 
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
 
@@ -1417,14 +1415,14 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         try (TestBridge testBridge = new TestBridge(connectionInfo, SouthboundITConstants.BRIDGE_NAME)) {
             OvsdbBridgeAugmentation bridge = getBridge(connectionInfo);
             Assert.assertNotNull(bridge);
-            NodeId nodeId = SouthboundUtils.createManagedNodeId(SouthboundUtils.createInstanceIdentifier(
+            final NodeId nodeId = SouthboundUtils.createManagedNodeId(SouthboundUtils.createInstanceIdentifier(
                     connectionInfo, bridge.getBridgeName()));
             OvsdbTerminationPointAugmentationBuilder ovsdbTerminationBuilder =
                     createGenericOvsdbTerminationPointAugmentationBuilder();
             String portName = "testOfPortRequest";
             ovsdbTerminationBuilder.setName(portName);
-            Integer ofPortRequestExpected = OFPORT_EXPECTED.intValue();
-            ovsdbTerminationBuilder.setOfport(OFPORT_INPUT);
+            Integer ofPortRequestExpected = ofportExpected.intValue();
+            ovsdbTerminationBuilder.setOfport(ofportInput);
             ovsdbTerminationBuilder.setOfportRequest(ofPortRequestExpected);
             Assert.assertTrue(addTerminationPoint(nodeId, portName, ovsdbTerminationBuilder));
             InstanceIdentifier<Node> terminationPointIid = getTpIid(connectionInfo, bridge);
@@ -1439,7 +1437,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                     Long ofPort = ovsdbTerminationPointAugmentation.getOfport();
                     // if ephemeral port 45008 is in use, ofPort is set to 1
-                    Assert.assertTrue(ofPort.equals(OFPORT_EXPECTED) || ofPort.equals(1L));
+                    Assert.assertTrue(ofPort.equals(ofportExpected) || ofPort.equals(1L));
                     LOG.info("ofPort: {}", ofPort);
 
                     Integer ofPortRequest = ovsdbTerminationPointAugmentation.getOfportRequest();
@@ -1466,6 +1464,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private interface SouthboundTerminationPointHelper<T> {
         void writeValues(OvsdbTerminationPointAugmentationBuilder builder, List<T> values);
+
         List<T> readValues(OvsdbTerminationPointAugmentation augmentation);
     }
 
@@ -1477,7 +1476,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     private <T> void testCRUDTerminationPoint(
             KeyValueBuilder<T> builder, String prefix, SouthboundTerminationPointHelper<T> helper)
             throws InterruptedException {
-        final int TERMINATION_POINT_TEST_INDEX = 0;
+        final int terminationPointTestIndex = 0;
 
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
 
@@ -1508,7 +1507,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     // then repeat for OPERATIONAL data store
                     OvsdbTerminationPointAugmentation updateFromConfigurationTerminationPointAugmentation =
                             getOvsdbTerminationPointAugmentation(connectionInfo, testBridgeAndPortName,
-                                    LogicalDatastoreType.CONFIGURATION, TERMINATION_POINT_TEST_INDEX);
+                                    LogicalDatastoreType.CONFIGURATION, terminationPointTestIndex);
                     if (updateFromConfigurationTerminationPointAugmentation != null) {
                         List<T> updateFromConfigurationValues =
                                 helper.readValues(updateFromConfigurationTerminationPointAugmentation);
@@ -1516,7 +1515,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     }
                     OvsdbTerminationPointAugmentation updateFromOperationalTerminationPointAugmentation =
                             getOvsdbTerminationPointAugmentation(connectionInfo, testBridgeAndPortName,
-                                    LogicalDatastoreType.OPERATIONAL, TERMINATION_POINT_TEST_INDEX);
+                                    LogicalDatastoreType.OPERATIONAL, terminationPointTestIndex);
                     if (updateFromOperationalTerminationPointAugmentation != null) {
                         List<T> updateFromOperationalValues =
                                 helper.readValues(updateFromOperationalTerminationPointAugmentation);
@@ -1546,7 +1545,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     // then repeat for OPERATIONAL data store
                     OvsdbTerminationPointAugmentation updateToConfigurationTerminationPointAugmentation =
                             getOvsdbTerminationPointAugmentation(connectionInfo, testBridgeAndPortName,
-                                    LogicalDatastoreType.CONFIGURATION, TERMINATION_POINT_TEST_INDEX);
+                                    LogicalDatastoreType.CONFIGURATION, terminationPointTestIndex);
                     if (updateToConfigurationTerminationPointAugmentation != null) {
                         List<T> updateToConfigurationValues =
                                 helper.readValues(updateToConfigurationTerminationPointAugmentation);
@@ -1555,7 +1554,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     }
                     OvsdbTerminationPointAugmentation updateToOperationalTerminationPointAugmentation =
                             getOvsdbTerminationPointAugmentation(connectionInfo, testBridgeAndPortName,
-                                    LogicalDatastoreType.OPERATIONAL, TERMINATION_POINT_TEST_INDEX);
+                                    LogicalDatastoreType.OPERATIONAL, terminationPointTestIndex);
                     if (updateToOperationalTerminationPointAugmentation != null) {
                         List<T> updateToOperationalValues =
                                 helper.readValues(updateToOperationalTerminationPointAugmentation);
@@ -1721,8 +1720,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testCRUDTerminationPointVlan() throws InterruptedException {
-        final Integer CREATED_VLAN_ID = 4000;
-        final Integer UPDATED_VLAN_ID = 4001;
+        final Integer createdVlanId = 4000;
+        final Integer updatedVlanId = 4001;
 
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
 
@@ -1736,7 +1735,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     createGenericOvsdbTerminationPointAugmentationBuilder();
             String portName = "testTerminationPointVlanId";
             ovsdbTerminationBuilder.setName(portName);
-            ovsdbTerminationBuilder.setVlanTag(new VlanId(CREATED_VLAN_ID));
+            ovsdbTerminationBuilder.setVlanTag(new VlanId(createdVlanId));
             Assert.assertTrue(addTerminationPoint(nodeId, portName, ovsdbTerminationBuilder));
             InstanceIdentifier<Node> terminationPointIid = getTpIid(connectionInfo, bridge);
             Node terminationPointNode = mdsalUtils.read(LogicalDatastoreType.OPERATIONAL, terminationPointIid);
@@ -1752,7 +1751,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     VlanId actualVlanId = ovsdbTerminationPointAugmentation.getVlanTag();
                     Assert.assertNotNull(actualVlanId);
                     Integer actualVlanIdInt = actualVlanId.getValue();
-                    Assert.assertEquals(CREATED_VLAN_ID, actualVlanIdInt);
+                    Assert.assertEquals(createdVlanId, actualVlanIdInt);
                 }
             }
 
@@ -1760,7 +1759,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             NodeId testBridgeNodeId = getBridgeNode(connectionInfo, SouthboundITConstants.BRIDGE_NAME).getNodeId();
             OvsdbTerminationPointAugmentationBuilder tpUpdateAugmentationBuilder =
                     new OvsdbTerminationPointAugmentationBuilder();
-            tpUpdateAugmentationBuilder.setVlanTag(new VlanId(UPDATED_VLAN_ID));
+            tpUpdateAugmentationBuilder.setVlanTag(new VlanId(updatedVlanId));
             InstanceIdentifier<Node> portIid = SouthboundMapper.createInstanceIdentifier(testBridgeNodeId);
             NodeBuilder portUpdateNodeBuilder = new NodeBuilder();
             NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
@@ -1785,7 +1784,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     VlanId actualVlanId = ovsdbTerminationPointAugmentation.getVlanTag();
                     Assert.assertNotNull(actualVlanId);
                     Integer actualVlanIdInt = actualVlanId.getValue();
-                    Assert.assertEquals(UPDATED_VLAN_ID, actualVlanIdInt);
+                    Assert.assertEquals(updatedVlanId, actualVlanIdInt);
                 }
             }
 
@@ -1795,7 +1794,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testCRUDTerminationPointVlanModes() throws InterruptedException {
-        final VlanMode UPDATED_VLAN_MODE = VlanMode.Access;
+        final VlanMode updatedVlanMode = VlanMode.Access;
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
         VlanMode []vlanModes = VlanMode.values();
         for (VlanMode vlanMode : vlanModes) {
@@ -1830,7 +1829,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 NodeId testBridgeNodeId = getBridgeNode(connectionInfo, SouthboundITConstants.BRIDGE_NAME).getNodeId();
                 OvsdbTerminationPointAugmentationBuilder tpUpdateAugmentationBuilder =
                         new OvsdbTerminationPointAugmentationBuilder();
-                tpUpdateAugmentationBuilder.setVlanMode(UPDATED_VLAN_MODE);
+                tpUpdateAugmentationBuilder.setVlanMode(updatedVlanMode);
                 InstanceIdentifier<Node> portIid = SouthboundMapper.createInstanceIdentifier(testBridgeNodeId);
                 NodeBuilder portUpdateNodeBuilder = new NodeBuilder();
                 NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
@@ -1853,7 +1852,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                             terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         //test
-                        Assert.assertEquals(UPDATED_VLAN_MODE, ovsdbTerminationPointAugmentation.getVlanMode());
+                        Assert.assertEquals(updatedVlanMode, ovsdbTerminationPointAugmentation.getVlanMode());
                     }
                 }
 
@@ -1862,7 +1861,6 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         }
     }
 
-    @SuppressWarnings("unchecked")
     private List<Set<Integer>> generateVlanSets() {
         int min = 0;
         int max = 4095;
@@ -1884,7 +1882,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     @Test
     public void testCRUDTerminationPointVlanTrunks() throws InterruptedException {
-        final List<Trunks> UPDATED_TRUNKS = buildTrunkList(Collections.singleton(2011));
+        final List<Trunks> updatedTrunks = buildTrunkList(Collections.singleton(2011));
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
         Iterable<Set<Integer>> vlanSets = generateVlanSets();
         int testCase = 0;
@@ -1924,7 +1922,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 NodeId testBridgeNodeId = getBridgeNode(connectionInfo, SouthboundITConstants.BRIDGE_NAME).getNodeId();
                 OvsdbTerminationPointAugmentationBuilder tpUpdateAugmentationBuilder =
                         new OvsdbTerminationPointAugmentationBuilder();
-                tpUpdateAugmentationBuilder.setTrunks(UPDATED_TRUNKS);
+                tpUpdateAugmentationBuilder.setTrunks(updatedTrunks);
                 InstanceIdentifier<Node> portIid = SouthboundMapper.createInstanceIdentifier(testBridgeNodeId);
                 NodeBuilder portUpdateNodeBuilder = new NodeBuilder();
                 NodeId portUpdateNodeId = SouthboundUtils.createManagedNodeId(portIid);
@@ -1947,7 +1945,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                             terminationPoint.getAugmentation(OvsdbTerminationPointAugmentation.class);
                     if (ovsdbTerminationPointAugmentation.getName().equals(portName)) {
                         //test
-                        Assert.assertEquals(UPDATED_TRUNKS, ovsdbTerminationPointAugmentation.getTrunks());
+                        Assert.assertEquals(updatedTrunks, ovsdbTerminationPointAugmentation.getTrunks());
                     }
                 }
 
@@ -1972,8 +1970,6 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     LogicalDatastoreType.OPERATIONAL);
             QosEntries operQos = getQos(new Uri(testQosId), ovsdbNodeAugmentation);
             Assert.assertNotNull(operQos);
-            Uuid qosUuid = new Uuid(operQos.getQosUuid().getValue());
-
             OvsdbBridgeAugmentation bridge = getBridge(connectionInfo);
             Assert.assertNotNull(bridge);
             NodeId nodeId = SouthboundUtils.createManagedNodeId(connectionInfo, bridge.getBridgeName());
@@ -2047,6 +2043,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private interface SouthboundBridgeHelper<T> {
         void writeValues(OvsdbBridgeAugmentationBuilder builder, List<T> values);
+
         List<T> readValues(OvsdbBridgeAugmentation augmentation);
     }
 
@@ -2142,7 +2139,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         typeList.add(SouthboundConstants.QOS_LINUX_HFSC);
 
         for (String qosType : typeList) {
-            try (TestQos testQos = new TestQos(connectionInfo, qosUri, SouthboundMapper.createQosType(qosType), null, null)) {
+            try (TestQos testQos = new TestQos(connectionInfo, qosUri, SouthboundMapper.createQosType(qosType),
+                    null, null)) {
                 ovsdbNodeAugmentation = getOvsdbNode(connectionInfo,
                         LogicalDatastoreType.OPERATIONAL);
                 QosEntries operQosHtb = getQos(qosUri, ovsdbNodeAugmentation);
@@ -2198,6 +2196,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private interface SouthboundQueueHelper<T> {
         void writeValues(QueuesBuilder builder, List<T> values);
+
         List<T> readValues(Queues queue);
     }
 
@@ -2236,6 +2235,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private interface SouthboundQosHelper<T> {
         void writeValues(QosEntriesBuilder builder, List<T> values);
+
         List<T> readValues(QosEntries qos);
     }
 
@@ -2264,7 +2264,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 String testQueueId = String.format("%s_%s", prefix, updateToTestCase.name);
 
                 // CREATE: and update the test queue with starting values.
-                try (TestQueue testQueue = new TestQueue(connectionInfo, new Uri(testQueueId), new Short("45"), null, null)) {
+                try (TestQueue testQueue = new TestQueue(connectionInfo, new Uri(testQueueId),
+                        new Short("45"), null, null)) {
                     QueuesBuilder queuesBuilder = new QueuesBuilder();
                     queuesBuilder.setQueueId(new Uri(testQueueId));
                     InstanceIdentifier<Queues> queueIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
@@ -2286,7 +2287,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                     // then repeat for OPERATIONAL data store
                     OvsdbNodeAugmentation updateFromConfigurationOvsdbNodeAugmentation = getOvsdbNode(connectionInfo,
                             LogicalDatastoreType.CONFIGURATION);
-                    Queues queueFromConfig = getQueue(new Uri(testQueueId), updateFromConfigurationOvsdbNodeAugmentation);
+                    Queues queueFromConfig =
+                            getQueue(new Uri(testQueueId), updateFromConfigurationOvsdbNodeAugmentation);
                     if (queueFromConfig != null) {
                         List<T> updateFromConfigurationValues =
                                 helper.readValues(queueFromConfig);
@@ -2404,7 +2406,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
                 String testQosId = String.format("%s_%s", prefix, updateToTestCase.name);
 
                 // CREATE: and update the test qos with starting values.
-                try (TestQos testQos = new TestQos(connectionInfo, new Uri(testQosId), SouthboundMapper.createQosType(SouthboundConstants.QOS_LINUX_HTB), null, null)) {
+                try (TestQos testQos = new TestQos(connectionInfo, new Uri(testQosId),
+                        SouthboundMapper.createQosType(SouthboundConstants.QOS_LINUX_HTB), null, null)) {
                     QosEntriesBuilder qosBuilder = new QosEntriesBuilder();
                     qosBuilder.setQosId(new Uri(testQosId));
                     InstanceIdentifier<QosEntries> qosIid = SouthboundUtils.createInstanceIdentifier(connectionInfo)
@@ -2489,6 +2492,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         testCRUDQos(new SouthboundQosOtherConfigBuilder(), "QosOtherConfig",
                 new SouthboundQosOtherConfigHelper());
     }
+
     @Test
     public void testCRUDQosQueues() throws InterruptedException {
         ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
@@ -2592,7 +2596,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     private Boolean isQueueInList(List<QueueList> queueList, QueueList queue) {
         for (QueueList queueEntry : queueList) {
-            if (queueEntry.getQueueNumber().equals(queue.getQueueNumber())&& queueEntry.getQueueRef().equals(queue.getQueueRef())) {
+            if (queueEntry.getQueueNumber().equals(queue.getQueueNumber())
+                    && queueEntry.getQueueRef().equals(queue.getQueueRef())) {
                 return true;
             }
         }
@@ -2623,8 +2628,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          * @param inputValues The input values (provided as input to the underlying augmentation builder).
          * @param expectedValues The expected values (checked against the output of the underlying augmentation).
          */
-        public SouthboundTestCase(
-                final String name, final List<T> inputValues, final List<T> expectedValues) {
+        SouthboundTestCase(final String name, final List<T> inputValues, final List<T> expectedValues) {
             this.name = name;
             this.inputValues = inputValues;
             this.expectedValues = expectedValues;
@@ -2645,30 +2649,30 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          * Creates a builder. Builders may be reused, the generated immutable instances are independent of the
          * builders. There are no default values.
          */
-        public SouthboundTestCaseBuilder() {
+        SouthboundTestCaseBuilder() {
             // Nothing to do
         }
 
         /**
          * Sets the test case's name.
          *
-         * @param name The test case's name.
+         * @param value The test case's name.
          * @return The builder.
          */
-        public SouthboundTestCaseBuilder<T> name(final String name) {
-            this.name = name;
+        public SouthboundTestCaseBuilder<T> name(final String value) {
+            this.name = value;
             return this;
         }
 
         /**
          * Sets the input values.
          *
-         * @param inputValues The input values.
+         * @param values The input values.
          * @return The builder.
          */
         @SafeVarargs
-        public final SouthboundTestCaseBuilder<T> input(final T... inputValues) {
-            this.inputValues = Lists.newArrayList(inputValues);
+        public final SouthboundTestCaseBuilder<T> input(final T... values) {
+            this.inputValues = Lists.newArrayList(values);
             return this;
         }
 
@@ -2697,7 +2701,6 @@ public class SouthboundIT extends AbstractMdsalTestBase {
          *
          * @return The test case.
          */
-        @SuppressWarnings("unchecked")
         public SouthboundTestCase<T> build() {
             return new SouthboundTestCase<>(name, inputValues, expectedValues);
         }
@@ -3004,9 +3007,9 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             KeyValueBuilder<T> builder, String testName) {
         List<SouthboundTestCase<T>> testCases = new ArrayList<>();
 
-        final String GOOD_KEY = "GoodKey";
-        final String GOOD_VALUE = "GoodValue";
-        final String NO_VALUE_FOR_KEY = "NoValueForKey";
+        final String goodKey = "GoodKey";
+        final String goodValue = "GoodValue";
+        final String noValueForKey = "NoValueForKey";
 
         final String idKey = testName + "Key";
         final String idValue = testName + "Value";
@@ -3055,8 +3058,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
             testCases.add(new SouthboundTestCaseBuilder<T>()
                     .name(testOneGoodOneMalformedValueName)
                     .input(
-                            builder.build(testOneGoodOneMalformedValueName, GOOD_KEY, GOOD_VALUE),
-                            builder.build(testOneGoodOneMalformedValueName, NO_VALUE_FOR_KEY, null))
+                            builder.build(testOneGoodOneMalformedValueName, goodKey, goodValue),
+                            builder.build(testOneGoodOneMalformedValueName, noValueForKey, null))
                     .expectNoOutput()
                     .build());
             builder.reset();
@@ -3093,8 +3096,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
         }
     }
 
-    private static class InterfaceLldpSouthboundHelper implements
-    SouthboundTerminationPointHelper<InterfaceLldp> {
+    private static class InterfaceLldpSouthboundHelper implements  SouthboundTerminationPointHelper<InterfaceLldp> {
         @Override
         public void writeValues(
                 OvsdbTerminationPointAugmentationBuilder builder, List<InterfaceLldp> values) {
index 6c378227f5c2f8525034c0a8e5f8b0fb7a3b5665..790211b8d879a62cc1e43772d1d00fc2621176d2 100644 (file)
@@ -8,24 +8,20 @@
 package org.opendaylight.ovsdb.southbound.it;
 
 /**
- * Constants for SouthboundIT
+ * Constants for SouthboundIT.
  */
-public final class SouthboundITConstants {
-    private SouthboundITConstants() {
-        throw new AssertionError("This class should not be instantiated.");
-    }
-
-    public static final String ORG_OPS4J_PAX_LOGGING_CFG = "etc/org.ops4j.pax.logging.cfg";
-    public static final String CUSTOM_PROPERTIES = "etc/custom.properties";
-    public static final String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
-    public static final String SERVER_PORT = "ovsdbserver.port";
-    public static final String CONNECTION_TYPE = "ovsdbserver.connection";
-    public static final String CONNECTION_TYPE_ACTIVE = "active";
-    public static final String CONNECTION_TYPE_PASSIVE = "passive";
-    public static final int CONNECTION_INIT_TIMEOUT = 10000;
-    public static final String DEFAULT_SERVER_IPADDRESS = "127.0.0.1";
-    public static final String DEFAULT_SERVER_PORT = "6640";
-    public static final String DEFAULT_OPENFLOW_PORT = "6653";
-    public static final String BRIDGE_NAME = "brtest";
-    public static final String OPENFLOW_CONNECTION_PROTOCOL = "tcp";
+public interface SouthboundITConstants {
+    String ORG_OPS4J_PAX_LOGGING_CFG = "etc/org.ops4j.pax.logging.cfg";
+    String CUSTOM_PROPERTIES = "etc/custom.properties";
+    String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
+    String SERVER_PORT = "ovsdbserver.port";
+    String CONNECTION_TYPE = "ovsdbserver.connection";
+    String CONNECTION_TYPE_ACTIVE = "active";
+    String CONNECTION_TYPE_PASSIVE = "passive";
+    int CONNECTION_INIT_TIMEOUT = 10000;
+    String DEFAULT_SERVER_IPADDRESS = "127.0.0.1";
+    String DEFAULT_SERVER_PORT = "6640";
+    String DEFAULT_OPENFLOW_PORT = "6653";
+    String BRIDGE_NAME = "brtest";
+    String OPENFLOW_CONNECTION_PROTOCOL = "tcp";
 }