Change PortMapping implementations
[transportpce.git] / olm / src / test / java / org / opendaylight / transportpce / olm / power / PowerMgmtTest.java
index c7e8d1b2927c3e17da21f01224d58ccfbd68e1ea..0bb439bcb4c3e6ecfc300ec5e4b6de913b73b639 100644 (file)
@@ -79,6 +79,10 @@ public class PowerMgmtTest extends AbstractTest {
         this.crossConnectImpl22 = new CrossConnectImpl221(deviceTransactionManager);
         this.crossConnect = new CrossConnectImpl(deviceTransactionManager, this.mappingUtils, this.crossConnectImpl121,
                 this.crossConnectImpl22, this.crossConnectImpl710);
+        this.portMappingVersion22 = new PortMappingVersion221(dataBroker, deviceTransactionManager);
+        this.portMappingVersion121 = new PortMappingVersion121(dataBroker, deviceTransactionManager);
+        this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion710,
+                this.portMappingVersion22, this.portMappingVersion121);
         this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
         this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager);
         this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager);
@@ -86,12 +90,6 @@ public class PowerMgmtTest extends AbstractTest {
                 this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
             this.openRoadmInterfacesImpl710);
         this.openRoadmInterfaces = Mockito.spy(this.openRoadmInterfaces);
-        this.portMappingVersion22 =
-                new PortMappingVersion221(dataBroker, deviceTransactionManager, this.openRoadmInterfaces);
-        this.portMappingVersion121 =
-                new PortMappingVersion121(dataBroker, deviceTransactionManager, this.openRoadmInterfaces);
-        this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion710,
-                this.portMappingVersion22, this.portMappingVersion121);
         this.portMapping = Mockito.spy(this.portMapping);
         this.powerMgmt = new PowerMgmtImpl(this.dataBroker, this.openRoadmInterfaces, this.crossConnect,
                 this.deviceTransactionManager);