facdb2a8ec47f4f43930cd2ad0f2ab4d7384901c
[mdsal.git] / binding / mdsal-binding-generator-impl / src / test / java / org / opendaylight / mdsal / binding / generator / impl / YangTextTemplateTest.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.mdsal.binding.generator.impl;
9
10 import java.lang.reflect.Constructor;
11 import java.lang.reflect.InvocationTargetException;
12 import org.junit.Test;
13 import org.opendaylight.mdsal.binding.model.util.FormattingUtils;
14
15 public class YangTextTemplateTest {
16
17     @Test(expected = UnsupportedOperationException.class)
18     public void privateConstructTest() throws Throwable {
19         final Constructor<FormattingUtils> constructor = FormattingUtils.class.getDeclaredConstructor();
20         constructor.setAccessible(true);
21         try {
22             constructor.newInstance();
23         } catch (InvocationTargetException e) {
24             throw e.getCause();
25         }
26     }
27 }