Remove unneeded throws
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / YT1385Test.java
1 /*
2  * Copyright (c) 2022 PANTHEON.tech, s.r.o. 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.yangtools.yang.stmt;
9
10 import static org.hamcrest.CoreMatchers.allOf;
11 import static org.hamcrest.CoreMatchers.endsWith;
12 import static org.hamcrest.CoreMatchers.startsWith;
13
14 import org.junit.Test;
15
16 public class YT1385Test extends AbstractYangTest {
17     @Test
18     public void testSameModuleWrongUnique() {
19         assertSourceException(allOf(
20             startsWith("Following components of unique statement argument refer to non-existent nodes: "
21                 + "[Descendant{qnames=[(foo)bar]}] [at "),
22             endsWith("YT1385/foo.yang:7:5]")),
23             "/bugs/YT1385/foo.yang");
24     }
25 }