Fix checkstyle issues in module sal-dom-broker
[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 public class MountPointServiceTest {
25
26     private DOMMountPointService mountService;
27     private static final YangInstanceIdentifier PATH = YangInstanceIdentifier
28             .of(QName.create("namespace", "2012-12-12", "top"));
29
30     @Before
31     public void setup() {
32         mountService = new DOMMountPointServiceImpl();
33     }
34
35     @Test
36     public void createSimpleMountPoint() {
37         Optional<DOMMountPoint> mountNotPresent = mountService.getMountPoint(PATH);
38         assertFalse(mountNotPresent.isPresent());
39         DOMMountPointBuilder mountBuilder = mountService.createMountPoint(PATH);
40         mountBuilder.register();
41
42         Optional<DOMMountPoint> mountPresent = mountService.getMountPoint(PATH);
43         assertTrue(mountPresent.isPresent());
44     }
45 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.