2 * Copyright (c) 2014 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.protocol.concepts;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11 import static org.junit.jupiter.api.Assertions.assertThrows;
13 import org.junit.jupiter.api.Test;
14 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 class DefaultInstanceReferenceTest {
18 private static final InstanceIdentifier<NetworkTopology> IID = InstanceIdentifier.create(NetworkTopology.class);
21 void testDefaultInstanceReference() {
22 final var defaultIID = new DefaultInstanceReference<>(IID);
23 assertEquals(IID, defaultIID.getInstanceIdentifier());
27 void testNullReference() {
28 assertThrows(NullPointerException.class, () -> new DefaultInstanceReference<>(null));