2 * Copyright © 2018 Orange Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.olm.stub;
11 import java.util.Optional;
12 import org.opendaylight.mdsal.binding.api.MountPoint;
13 import org.opendaylight.mdsal.binding.api.MountPointService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 public class MountPointServiceStub implements MountPointService {
19 MountPoint returnedMountPoint;
21 public MountPointServiceStub(MountPoint usedMountPoint) {
22 this.returnedMountPoint = usedMountPoint;
26 public Optional<MountPoint> getMountPoint(InstanceIdentifier<?> mountPoint) {
27 if (returnedMountPoint == null) {
28 return Optional.empty();
30 return Optional.of(returnedMountPoint);
34 public <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path,