Update Tomas's name
[netconf.git] / protocol / netconf-server / src / test / java / org / opendaylight / netconf / server / api / operations / 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 package org.opendaylight.netconf.server.api.operations;
9
10 import static org.junit.Assert.assertEquals;
11
12 import org.junit.Test;
13 import org.opendaylight.netconf.api.DocumentedException;
14 import org.opendaylight.netconf.api.xml.XmlElement;
15 import org.w3c.dom.Document;
16 import org.w3c.dom.Element;
17
18 public class AbstractSingletonNetconfOperationTest {
19     private static final class SingletonNCOperationImpl extends AbstractSingletonNetconfOperation {
20         SingletonNCOperationImpl(final String netconfSessionIdForReporting) {
21             super(netconfSessionIdForReporting);
22         }
23
24         @Override
25         protected Element handleWithNoSubsequentOperations(final Document document,
26                 final XmlElement operationElement) throws DocumentedException {
27             return null;
28         }
29
30         @Override
31         protected String getOperationName() {
32             return null;
33         }
34     }
35
36     @Test
37     public void testAbstractSingletonNetconfOperation() throws Exception {
38         SingletonNCOperationImpl operation = new SingletonNCOperationImpl("");
39         assertEquals(operation.getHandlingPriority(), HandlingPriority.HANDLE_WITH_MAX_PRIORITY);
40     }
41 }