2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.stmt;
10 import static org.hamcrest.CoreMatchers.instanceOf;
11 import static org.hamcrest.MatcherAssert.assertThat;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
16 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
18 public class Bug5550Test extends AbstractYangTest {
19 private static final String NS = "foo";
20 private static final String REV = "2016-03-18";
24 final var context = assertEffectiveModelDir("/bugs/bug5550");
26 QName root = QName.create(NS, REV, "root");
27 QName containerInGrouping = QName.create(NS, REV, "container-in-grouping");
28 QName leaf1 = QName.create(NS, REV, "leaf-1");
30 SchemaNode findDataSchemaNode = context.findDataTreeChild(root, containerInGrouping, leaf1).get();
31 assertThat(findDataSchemaNode, instanceOf(LeafSchemaNode.class));