/* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.stmt; import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Test; import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException; public class Bug4410Test extends AbstractYangTest { @Test public void test() { final var cause = assertInferenceExceptionDir("/bugs/bug4410", startsWith("Yang model processing phase EFFECTIVE_MODEL failed [at ")).getCause(); assertThat(cause, instanceOf(InferenceException.class)); assertThat(cause.getMessage(), allOf(startsWith("Type [(foo)"), containsString("was not found"))); } }