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.mdsal.common.api;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11 import static org.junit.jupiter.api.Assertions.assertSame;
13 import org.junit.jupiter.api.Test;
14 import org.opendaylight.yangtools.concepts.HierarchicalIdentifier;
16 class DataValidationFailedExceptionTest {
18 void dataValidationFailedExceptionTest() throws Exception {
19 final var testObj = new TestClass();
20 final var dataValidationFailedException = new DataValidationFailedException(TestClass.class, testObj, "test");
21 assertEquals(testObj, dataValidationFailedException.getPath());
22 assertSame(TestClass.class, dataValidationFailedException.getPathType());
25 private static final class TestClass implements HierarchicalIdentifier<TestClass> {
27 private static final long serialVersionUID = 1L;
30 public boolean contains(final TestClass other) {