Reformulate YangInstanceIdentifierWriterTest
[yangtools.git] / data / yang-data-api / src / test / java / org / opendaylight / yangtools / yang / data / api / schema / DuplicityTest.java
1 /*
2  * Copyright (c) 2016 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.yangtools.yang.data.api.schema;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.mockito.Mockito.mock;
12
13 import java.util.Map;
14 import org.junit.Test;
15
16 public class DuplicityTest {
17     @Test
18     public void testDuplicate() {
19         final LeafNode<?> leafNode = mock(LeafNode.class);
20         final ContainerNode containerNode = mock(ContainerNode.class);
21         final Map<NormalizedNode, DuplicateEntry> normalizedNodeDuplicateEntryMapNode = NormalizedNodes
22                 .findDuplicates(leafNode);
23         final Map<NormalizedNode, DuplicateEntry> normalizedNodeDuplicateEntryMapContainer = NormalizedNodes
24                 .findDuplicates(containerNode);
25         assertEquals(0, normalizedNodeDuplicateEntryMapNode.size());
26         assertEquals(0, normalizedNodeDuplicateEntryMapContainer.size());
27     }
28 }