- this.crossConnectImpl121 = new CrossConnectImpl121(this.deviceTransactionManager);
- this.crossConnectImpl22 = new CrossConnectImpl22(this.deviceTransactionManager);
- this.crossConnect = new CrossConnectImpl(this.deviceTransactionManager, this.mappingUtils,
- this.crossConnectImpl121, this.crossConnectImpl22);
- this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(this.deviceTransactionManager);
- this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl22(this.deviceTransactionManager);
- this.mappingUtils = new MappingUtilsImpl(getDataBroker());
- this.openRoadmInterfaces = new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils,
- openRoadmInterfacesImpl121, openRoadmInterfacesImpl22);
- this.portMappingVersion22 =
- new PortMappingVersion22(getDataBroker(), this.deviceTransactionManager, this.openRoadmInterfaces);
- this.portMappingVersion121 =
- new PortMappingVersion121(getDataBroker(), this.deviceTransactionManager, this.openRoadmInterfaces);
- this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion22, this.mappingUtils,
- this.portMappingVersion121);
- this.powerMgmt = new PowerMgmt(this.getDataBroker(), this.openRoadmInterfaces, this.crossConnect,
+ this.mappingUtils = Mockito.spy(new MappingUtilsImpl(getDataBroker()));
+ Mockito.doReturn(StringConstants.OPENROADM_DEVICE_VERSION_1_2_1).when(mappingUtils)
+ .getOpenRoadmVersion(Mockito.anyString());
+ this.deviceTransactionManager = new DeviceTransactionManagerImpl(mountPointService, 3000);
+ this.crossConnectImpl121 = new CrossConnectImpl121(deviceTransactionManager);
+ this.crossConnectImpl22 = new CrossConnectImpl221(deviceTransactionManager);
+ this.crossConnectImpl710 = new CrossConnectImpl710(deviceTransactionManager);
+ this.crossConnect = new CrossConnectImpl(deviceTransactionManager, this.mappingUtils, this.crossConnectImpl121,
+ this.crossConnectImpl22, this.crossConnectImpl710);
+ this.portMappingVersion710 = new PortMappingVersion710(getDataBroker(), deviceTransactionManager);
+ this.portMappingVersion22 = new PortMappingVersion221(getDataBroker(), deviceTransactionManager);
+ this.portMappingVersion121 = new PortMappingVersion121(getDataBroker(), deviceTransactionManager);
+ this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion710,
+ this.portMappingVersion22, this.portMappingVersion121);
+ this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
+ this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion22);
+ this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion710);
+ this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
+ this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
+ this.openRoadmInterfacesImpl710);
+ this.portMapping = Mockito.spy(this.portMapping);
+ this.powerMgmt = new PowerMgmtImpl(getDataBroker(), this.openRoadmInterfaces, this.crossConnect,