Search in sources :

Example 1 with ItmInternalTunnelAddWorker

use of org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelAddWorker in project genius by opendaylight.

the class ItmInternalTunnelAddTest method setUp.

@Before
public void setUp() {
    PowerMockito.mockStatic(ITMBatchingUtils.class);
    setupMocks();
    tunnelMonitorParamsOptional = Optional.of(tunnelMonitorParams);
    tunnelMonitorIntervalOptional = Optional.of(tunnelMonitorInterval);
    idOutputOptional1 = RpcResultBuilder.success(expectedId1).buildFuture();
    idOutputOptional2 = RpcResultBuilder.success(expectedId2).buildFuture();
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorParamsOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorParamsInstanceIdentifier);
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorIntervalOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorIntervalIdentifier);
    itmInternalTunnelAddWorker = new ItmInternalTunnelAddWorker(dataBroker, jobCoordinator, new TunnelMonitoringConfig(dataBroker, new GuavaCacheProvider(new CacheManagersRegistryImpl())), itmConfig);
}
Also used : ItmInternalTunnelAddWorker(org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelAddWorker) CacheManagersRegistryImpl(org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl) GuavaCacheProvider(org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ItmInternalTunnelAddWorker (org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelAddWorker)1 CacheManagersRegistryImpl (org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl)1 GuavaCacheProvider (org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider)1