Remove private constructor tests 25/67125/3
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Fri, 12 Jan 2018 15:57:33 +0000 (16:57 +0100)
committerClaudio David Gasparini <claudio.gasparini@pantheon.tech>
Mon, 22 Jan 2018 14:07:50 +0000 (14:07 +0000)
Change-Id: I33cc6ffcf940db226826e350e59c8af5eb1e1d71
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
rsvp/impl/src/test/java/org/opendaylight/protocol/rsvp/parser/impl/te/TEObjectTest.java
rsvp/spi/src/test/java/org/opendaylight/protocol/rsvp/parser/spi/EROSubobjectUtilTest.java

index 3035041cd2444b6ec8c9a6ecef342fc07350878b..ea9e01690be29fda2fd92cf5a8fea23cfee90a2c 100644 (file)
@@ -29,8 +29,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary.explicit.route.object.secondary.explicit.route.object.subobject.container.subobject.type.DynamicControlProtectionCaseBuilder;
 
 public class TEObjectTest {
-    RSVPActivator act;
-    SimpleRSVPExtensionProviderContext context;
+    private RSVPActivator act;
+    private SimpleRSVPExtensionProviderContext context;
 
     @Before
     public void setUp() {
index abc1cfcc535f8769b73fd4d96c948455abbeb254..31c622c9c87fa3fb5349a0b974baf9e0e97869c7 100644 (file)
@@ -11,24 +11,9 @@ import static org.junit.Assert.assertArrayEquals;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import org.junit.Test;
 
 public class EROSubobjectUtilTest {
-
-    @Test(expected = UnsupportedOperationException.class)
-    @SuppressWarnings({ "checkstyle:IllegalThrows", "checkstyle:avoidHidingCauseException" })
-    public void testPrivateConstructor() throws Throwable {
-        final Constructor<EROSubobjectUtil> c = EROSubobjectUtil.class.getDeclaredConstructor();
-        c.setAccessible(true);
-        try {
-            c.newInstance();
-        } catch (final InvocationTargetException e) {
-            throw e.getCause();
-        }
-    }
-
     @Test
     public void testFormatSubobject1() {
         final byte[] array = new byte[]{2, 3};