Merge "Make neutron a simple osgi app"
[controller.git] / opendaylight / netconf / netconf-util / src / test / java / org / opendaylight / controller / netconf / util / mapping / AbstractSingletonNetconfOperationTest.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.netconf.util.mapping;
10
11 import static org.junit.Assert.assertEquals;
12
13 import org.junit.Test;
14 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
15 import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;
16 import org.opendaylight.controller.netconf.util.xml.XmlElement;
17 import org.w3c.dom.Document;
18 import org.w3c.dom.Element;
19
20 public class AbstractSingletonNetconfOperationTest {
21     class SingletonNCOperationImpl extends AbstractSingletonNetconfOperation {
22
23         protected SingletonNCOperationImpl(String netconfSessionIdForReporting) {
24             super(netconfSessionIdForReporting);
25         }
26
27         @Override
28         protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement) throws NetconfDocumentedException {
29             return null;
30         }
31
32         @Override
33         protected String getOperationName() {
34             return null;
35         }
36     }
37
38     @Test
39     public void testAbstractSingletonNetconfOperation() throws Exception {
40         SingletonNCOperationImpl operation = new SingletonNCOperationImpl("");
41         assertEquals(operation.getHandlingPriority(), HandlingPriority.HANDLE_WITH_MAX_PRIORITY);
42     }
43 }