2 * Copyright (c) 2023 PANTHEON.tech, s.r.o. 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.binding.dom.codec.impl;
10 import static org.junit.Assert.assertEquals;
12 import org.junit.Test;
13 import org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal483.norev.Bar;
14 import org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal483.norev.BarBuilder;
15 import org.opendaylight.yang.gen.v1.urn.test.opendaylight.mdsal483.norev.Foo;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 import org.opendaylight.yangtools.yang.common.Uint64;
19 public class IdentityKeyTest extends AbstractBindingCodecTest {
21 public void testIdentityKey() {
22 final var expected = new BarBuilder()
27 final var actual = thereAndBackAgain(InstanceIdentifier.builder(Bar.class, expected.key()).build(), expected);
28 assertEquals(expected, actual);
29 assertEquals(expected.key(), actual.key());