use of org.opendaylight.genius.itm.cache.UnprocessedTunnelsStateCache in project genius by opendaylight.
the class TepCommandHelperTest method setUp.
@Before
public void setUp() {
setupMocks();
Optional<TransportZone> optionalTransportZone = Optional.of(transportZone);
optionalTransportZones = Optional.of(transportZones);
Optional<TunnelMonitorInterval> optionalTunnelMonitorInterval = Optional.of(tunnelMonitorInterval);
Optional<TunnelMonitorParams> optionalTunnelMonitorParams = Optional.of(tunnelMonitorParams);
Optional<Vteps> optionalVteps = Optional.of(vteps);
Optional<Interface> ifStateOptional = Optional.of(interfaceTest);
Optional<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> ifStateOptionalNew = Optional.of(interfaceTestNew);
doReturn(FluentFutures.immediateFluentFuture(optionalTransportZone)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, transportZoneIdentifier);
doReturn(FluentFutures.immediateFluentFuture(optionalTransportZones)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, transportZonesIdentifier);
doReturn(FluentFutures.immediateFluentFuture(optionalTunnelMonitorInterval)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorIntervalIdentifier);
doReturn(FluentFutures.immediateFluentFuture(optionalTunnelMonitorParams)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorParamsIdentifier);
doReturn(FluentFutures.immediateFluentFuture(optionalVteps)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, vtepsIdentifier);
lenient().doReturn(FluentFutures.immediateFluentFuture(ifStateOptional)).when(mockReadTx).read(LogicalDatastoreType.OPERATIONAL, interfaceIdentifier);
lenient().doReturn(FluentFutures.immediateFluentFuture(ifStateOptionalNew)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, interfaceIdentifierNew);
unprocessedTunnelsStateCache = new UnprocessedTunnelsStateCache();
tepCommandHelper = new TepCommandHelper(dataBroker, itmConfig, unprocessedTunnelsStateCache);
}
Aggregations