Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / test / java / org / opendaylight / controller / md / sal / dom / broker / impl / MountPointServiceTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.md.sal.dom.broker.impl;
10
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertTrue;
13
14 import com.google.common.base.Optional;
15 import org.junit.Before;
16 import org.junit.Test;
17 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
18 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
19 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService.DOMMountPointBuilder;
20 import org.opendaylight.controller.md.sal.dom.broker.impl.mount.DOMMountPointServiceImpl;
21 import org.opendaylight.yangtools.yang.common.QName;
22 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
23
24 @Deprecated
25 public class MountPointServiceTest {
26
27     private DOMMountPointService mountService;
28     private static final YangInstanceIdentifier PATH = YangInstanceIdentifier
29             .of(QName.create("namespace", "2012-12-12", "top"));
30
31     @Before
32     public void setup() {
33         mountService = new DOMMountPointServiceImpl();
34     }
35
36     @Test
37     public void createSimpleMountPoint() {
38         Optional<DOMMountPoint> mountNotPresent = mountService.getMountPoint(PATH);
39         assertFalse(mountNotPresent.isPresent());
40         DOMMountPointBuilder mountBuilder = mountService.createMountPoint(PATH);
41         mountBuilder.register();
42
43         Optional<DOMMountPoint> mountPresent = mountService.getMountPoint(PATH);
44         assertTrue(mountPresent.isPresent());
45     }
46 }