import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.core.api.Broker;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
public class NetconfDeviceSalProviderTest {
- @Mock
- private Broker.ProviderSession session;
@Mock
private DOMMountPointService mountpointService;
@Mock
doReturn(Futures.immediateCheckedFuture(null)).when(writeTx).submit();
provider = new NetconfDeviceSalProvider(new RemoteDeviceId("device1",
InetSocketAddress.createUnresolved("localhost", 17830)), mountPointService, dataBroker);
- when(session.getService(DOMMountPointService.class)).thenReturn(mountpointService);
when(context.getSALService(DataBroker.class)).thenReturn(dataBroker);
when(chain.newWriteOnlyTransaction()).thenReturn(tx);
when(tx.submit()).thenReturn(Futures.immediateCheckedFuture(null));
provider.close();
verify(chain, times(2)).close();
}
-}
\ No newline at end of file
+}