Convert DataChangeListeners to DataTreeChangeListeners
[groupbasedpolicy.git] / renderers / faas / src / test / java / org / opendaylight / groupbasedpolicy / renderer / faas / MockFaasContractManagerListener.java
index 66dbe7dbf367e0aed1caa249d572ce7f74cceb4c..ebae293008b764e3d263740f3921896655131f61 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016 Huawei Technologies and others. All rights reserved.
- * 
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -9,8 +9,7 @@ package org.opendaylight.groupbasedpolicy.renderer.faas;
 
 import static org.junit.Assert.assertTrue;
 
-import java.util.concurrent.ScheduledExecutorService;
-
+import java.util.concurrent.Executor;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroupsBuilder;
@@ -23,7 +22,7 @@ public class MockFaasContractManagerListener extends FaasContractManagerListener
     private Uuid expectedFaasSecId;
 
     public MockFaasContractManagerListener(DataBroker dataProvider, TenantId gbpTenantId, Uuid faasTenantId,
-            ScheduledExecutorService executor) {
+            Executor executor) {
         super(dataProvider, gbpTenantId, faasTenantId, executor);
     }
 
@@ -32,8 +31,9 @@ public class MockFaasContractManagerListener extends FaasContractManagerListener
     // *******************************************************
     @Override
     protected SecurityRuleGroupsBuilder initSecurityGroupBuilder(Contract contract) {
-        if (expectedContract != null)
+        if (expectedContract != null) {
             assertTrue("FaasContractManagerListener.initSecurityGroupBuilder", expectedContract.equals(contract));
+        }
         SecurityRuleGroupsBuilder sec = new SecurityRuleGroupsBuilder();
         sec.setUuid(expectedFaasSecId);
         return sec;