diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java b/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java index 7462a32b2..149fad354 100644 --- a/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java +++ b/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,33 +21,26 @@ package org.onap.vid.config; -import org.hibernate.SessionFactory; +import org.mockito.Mockito; import org.onap.vid.job.JobAdapter; -import org.onap.vid.job.JobsBrokerService; import org.onap.vid.job.impl.JobAdapterImpl; -import org.onap.vid.job.impl.JobsBrokerServiceInDatabaseImpl; -import org.onap.vid.properties.VidProperties; -import org.onap.portalsdk.core.service.DataAccessService; -import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; +import org.togglz.core.manager.FeatureManager; @Configuration @EnableTransactionManagement public class JobAdapterConfig { @Bean - public JobAdapter jobAdapter() { - return new JobAdapterImpl(); + public FeatureManager featureManager() { + return Mockito.mock(FeatureManager.class); } @Bean - public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory) { - int maxOpenedInstantiationRequestsToMso = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_MAX_OPENED_INSTANTIATION_REQUESTS)); - int pollingIntervalSeconds = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_ASYNC_POLLING_INTERVAL_SECONDS)); - - return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, maxOpenedInstantiationRequestsToMso, pollingIntervalSeconds); + public JobAdapter jobAdapter(FeatureManager featureManager) { + return new JobAdapterImpl(featureManager); } -} +}
\ No newline at end of file |