this.syncService = new MockSyncService();
FloodlightModuleContext fmc = new FloodlightModuleContext();
RestApiServer restApi = new RestApiServer();
MockThreadPoolService tp = new MockThreadPoolService();
ITopologyService topology = createMock(ITopologyService.class);
fmc.addService(IThreadPoolService.class, tp);
mockFloodlightProvider = getMockFloodlightProvider();
mockFloodlightProvider.setRole(initialRole, "");
deviceManager = new DeviceManagerImpl();
flowReconcileMgr = new FlowReconcileManager();
DefaultEntityClassifier entityClassifier = new DefaultEntityClassifier();
fmc.addService(IDeviceService.class, deviceManager);
storageSource = new MemoryStorageSource();
fmc.addService(IStorageSourceService.class, storageSource);
fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
fmc.addService(IRestApiService.class, restApi);
fmc.addService(IFlowReconcileService.class, flowReconcileMgr);
fmc.addService(IEntityClassifierService.class, entityClassifier);
fmc.addService(ITopologyService.class, topology);
fmc.addService(ISyncService.class, syncService);
tp.init(fmc);
restApi.init(fmc);
storageSource.init(fmc);
deviceManager.init(fmc);
flowReconcileMgr.init(fmc);
entityClassifier.init(fmc);
syncService.init(fmc);
storageSource.startUp(fmc);
deviceManager.startUp(fmc);
flowReconcileMgr.startUp(fmc);
tp.startUp(fmc);
entityClassifier.startUp(fmc);
syncService.startUp(fmc);
this.storeClient =
this.syncService.getStoreClient(DeviceManagerImpl.DEVICE_SYNC_STORE_NAME,