Merge "BUG 2854 : Do not add empty read write transactions to the replicable journal"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / cnsn / to / xml / test / CnSnToXmlNotExistingLeafTypeTest.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.controller.sal.restconf.impl.cnsn.to.xml.test;
9
10 import org.opendaylight.controller.sal.restconf.impl.test.DummyType;
11 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
12 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
13 import org.opendaylight.yangtools.yang.parser.builder.impl.ContainerSchemaNodeBuilder;
14 import org.opendaylight.yangtools.yang.parser.builder.impl.LeafSchemaNodeBuilder;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
17
18 public class CnSnToXmlNotExistingLeafTypeTest {
19
20     private static final Logger LOG = LoggerFactory.getLogger(CnSnToXmlNotExistingLeafTypeTest.class);
21
22
23     private DataSchemaNode prepareDataSchemaNode() {
24         final ContainerSchemaNodeBuilder contBuild = new ContainerSchemaNodeBuilder("module", 1, TestUtils.buildQName("cont",
25                 "simple:uri", "2012-12-17"), null);
26         final LeafSchemaNodeBuilder leafBuild = new LeafSchemaNodeBuilder("module", 2, TestUtils.buildQName("lf1",
27                 "simple:uri", "2012-12-17"), null);
28         leafBuild.setType(new DummyType());
29         leafBuild.setConfiguration(true);
30
31         contBuild.addChildNode(leafBuild);
32         return contBuild.build();
33     }
34
35 }