Bump versions to 0.21.8-SNAPSHOT
[bgpcep.git] / concepts / src / test / java / org / opendaylight / protocol / concepts / DefaultInstanceReferenceTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.concepts;
9
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11 import static org.junit.jupiter.api.Assertions.assertThrows;
12
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;
16
17 class DefaultInstanceReferenceTest {
18     private static final InstanceIdentifier<NetworkTopology> IID = InstanceIdentifier.create(NetworkTopology.class);
19
20     @Test
21     void testDefaultInstanceReference() {
22         final var defaultIID = new DefaultInstanceReference<>(IID);
23         assertEquals(IID, defaultIID.getInstanceIdentifier());
24     }
25
26     @Test
27     void testNullReference() {
28         assertThrows(NullPointerException.class, () -> new DefaultInstanceReference<>(null));
29     }
30 }