- when(rpcProviderRegistry.addRpcImplementation(eq(StatisticsManagerControlService.class), any())).thenReturn(controlServiceRegistration);
- when(switchConnectionProvider.startup()).thenReturn(Futures.immediateCheckedFuture(null));
-
- provider = new OpenFlowPluginProviderImpl(
- RPC_REQUESTS_QUOTA,
- GLOBAL_NOTIFICATION_QUOTA,
- THREAD_POOL_MIN_THREADS,
- THREAD_POOL_MAX_THREADS,
- THREAD_POOL_TIMEOUT);
-
- provider.setDataBroker(dataBroker);
- provider.setRpcProviderRegistry(rpcProviderRegistry);
- provider.setNotificationProviderService(notificationService);
- provider.setSwitchConnectionProviders(Lists.newArrayList(switchConnectionProvider));
- provider.setClusteringSingletonServicesProvider(clusterSingletonServiceProvider);
- }
-
- @After
- public void tearDown() throws Exception {
-
+ when(rpcProviderRegistry.addRpcImplementation(eq(StatisticsManagerControlService.class), any()))
+ .thenReturn(controlServiceRegistration);
+ when(switchConnectionProvider.startup()).thenReturn(Futures.immediateFuture(true));
+ when(switchConnectionProvider.shutdown()).thenReturn(Futures.immediateFuture(true));
+ when(configurationService.getProperty(eq(ConfigurationProperty.USE_SINGLE_LAYER_SERIALIZATION.toString()),
+ any())).thenReturn(USE_SINGLE_LAYER_SERIALIZATION);
+ when(configurationService.getProperty(eq(ConfigurationProperty.THREAD_POOL_MIN_THREADS.toString()), any()))
+ .thenReturn(THREAD_POOL_MIN_THREADS);
+ when(configurationService.getProperty(eq(ConfigurationProperty.THREAD_POOL_MAX_THREADS.toString()), any()))
+ .thenReturn(THREAD_POOL_MAX_THREADS);
+ when(configurationService.getProperty(eq(ConfigurationProperty.THREAD_POOL_TIMEOUT.toString()), any()))
+ .thenReturn(THREAD_POOL_TIMEOUT);
+ when(configurationService.getProperty(eq(ConfigurationProperty.RPC_REQUESTS_QUOTA.toString()), any()))
+ .thenReturn(RPC_REQUESTS_QUOTA);
+ when(configurationService.getProperty(eq(ConfigurationProperty.GLOBAL_NOTIFICATION_QUOTA.toString()), any()))
+ .thenReturn(GLOBAL_NOTIFICATION_QUOTA);
+ when(configurationService.getProperty(eq(ConfigurationProperty.BASIC_TIMER_DELAY.toString()), any()))
+ .thenReturn(BASIC_TIMER_DELAY);