+
+ private ProviderSession createMockContext() {
+ // TODO Auto-generated method stub
+ final ClassToInstanceMap<BrokerService> domBrokerServices = ImmutableClassToInstanceMap
+ .<BrokerService> builder()
+ //
+ .put(org.opendaylight.controller.sal.core.api.data.DataProviderService.class, biDataImpl) //
+ .put(RpcProvisionRegistry.class, biBrokerImpl.getRouter()) //
+ .put(MountProvisionService.class, biMountImpl) //
+ .build();
+
+ return new ProviderSession() {
+
+ @Override
+ public Future<RpcResult<CompositeNode>> rpc(QName rpc, CompositeNode input) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public <T extends BrokerService> T getService(Class<T> service) {
+ return domBrokerServices.getInstance(service);
+ }
+
+ @Override
+ public boolean isClosed() {
+ return false;
+ }
+
+ @Override
+ public Set<QName> getSupportedRpcs() {
+ return null;
+ }
+
+ @Override
+ public void close() {
+ }
+
+ @Override
+ public ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(
+ RpcRegistrationListener listener) {
+ return null;
+ }
+
+ @Override
+ public RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
+ throws IllegalArgumentException {
+ return null;
+ }
+
+ @Override
+ public RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation) {
+ return null;
+ }
+
+ @Override
+ public RoutedRpcRegistration addMountedRpcImplementation(QName rpcType, RpcImplementation implementation) {
+ return null;
+ }
+ };
+ }
+