2 * Copyright (c) 2016 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.yangtools.sal.binding.generator.impl;
10 import static org.junit.Assert.assertNotNull;
11 import static org.mockito.Mockito.mock;
13 import java.lang.reflect.Constructor;
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.binding.Identifiable;
16 import org.opendaylight.yangtools.yang.binding.Identifier;
18 public class CodecTypeUtilsTest {
21 public void newIdentifiableItem() throws Exception {
22 assertNotNull(CodecTypeUtils.newIdentifiableItem(Identifiable.class, mock(Identifier.class)));
25 @Test(expected = UnsupportedOperationException.class)
26 public void privateConstructTest() throws Throwable {
27 final Constructor constructor = CodecTypeUtils.class.getDeclaredConstructor();
28 constructor.setAccessible(true);
30 constructor.newInstance();
31 } catch (Exception e) {