package org.opendaylight.protocol.bmp.spi.parser;
import static org.junit.Assert.assertEquals;
-
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.DistinguisherType;
PeerDistinguisherUtil.serializePeerDistinguisher(dBuilder.build(), buffer);
Assert.assertArrayEquals(DISTINGUISHER_TYPE2, buffer.array());
}
+
+ @Test(expected=UnsupportedOperationException.class)
+ public void testPeerDistinguisherUtilPrivateConstructor() throws Throwable {
+ final Constructor<PeerDistinguisherUtil> c = PeerDistinguisherUtil.class.getDeclaredConstructor();
+ c.setAccessible(true);
+ try {
+ c.newInstance();
+ } catch (final InvocationTargetException e) {
+ throw e.getCause();
+ }
+ }
}