Rework IOVisor model and validate IovisorModuleInstance on Endpoint created events
[groupbasedpolicy.git] / renderers / iovisor / src / test / java / org / opendaylight / groupbasedpolicy / renderer / iovisor / utils / IovisorIidFactoryTest.java
1 /*
2  * Copyright (c) 2015 Inocybe Technologies 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
9 package org.opendaylight.groupbasedpolicy.renderer.iovisor.utils;
10
11 import static org.mockito.Mockito.mock;
12
13 import org.junit.Assert;
14 import org.junit.Test;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.iovisor.rev151030.iovisor.module.instances.IovisorModuleInstance;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.iovisor.rev151030.iovisor.module.instances.IovisorModuleInstanceKey;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18
19 public class IovisorIidFactoryTest {
20
21     @Test
22     public void iovisorModuleInstanceIidTest() {
23         IovisorModuleInstanceKey iovisorModuleInstanceKey = mock(IovisorModuleInstanceKey.class);
24         InstanceIdentifier<IovisorModuleInstance> identifier = IovisorIidFactory.iovisorModuleInstanceIid(iovisorModuleInstanceKey);
25         Assert.assertEquals(iovisorModuleInstanceKey, identifier.firstKeyOf(IovisorModuleInstance.class));
26     }
27 }