Remove unnecessary initMocks() in openflow-protocol-impl 67/99967/3
authorSangwook Ha <sangwook.ha@verizon.com>
Fri, 4 Mar 2022 08:24:57 +0000 (00:24 -0800)
committerRobert Varga <nite@hq.sk>
Fri, 11 Mar 2022 14:22:33 +0000 (14:22 +0000)
Some of the initMocks() in openflow-protocol-impl are unnecessary.
Remove them.

JIRA: OPNFLWPLUG-1122
Change-Id: Iad89eccdd1a855b584ace9a79162f39785a3aba2
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/OFFrameDecoderTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/SslContextFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/core/SslKeyStoreTest.java

index 3dfdae3021b2033e055200c5e269fbfd847a778c..c5f7448dbeda95739303ba4c9ad7602ca7694acf 100644 (file)
@@ -19,7 +19,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.openflowjava.protocol.impl.core.connection.ConnectionFacade;
 import org.opendaylight.openflowjava.util.ByteBufUtils;
@@ -45,7 +44,6 @@ public class OFFrameDecoderTest {
      */
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
         decoder = new OFFrameDecoder(connectionFacade, false);
         list.clear();
 
index ac7ab53e26e9a16a2548b762a23ee15be84cf7c3..751b5c455b8fb584bdd36a629707a5a1c943366f 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.collect.Lists;
 import javax.net.ssl.SSLContext;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.MockitoAnnotations;
 import org.opendaylight.openflowjava.protocol.api.connection.TlsConfiguration;
 import org.opendaylight.openflowjava.protocol.api.connection.TlsConfigurationImpl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.KeystoreType;
@@ -35,7 +34,6 @@ public class SslContextFactoryTest {
      */
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
         tlsConfiguration = new TlsConfigurationImpl(KeystoreType.JKS, "/exemplary-ctlTrustStore",
                 PathType.CLASSPATH, KeystoreType.JKS, "/exemplary-ctlKeystore", PathType.CLASSPATH,
                 Lists.newArrayList("TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_128_CBC_SHA256")) ;
index e864bad4ac6f435dc320532054cf76fcc254b429..4ee0fc7c94329e8ab13fa6488b75ebabd57f0d1c 100644 (file)
@@ -11,9 +11,7 @@ package org.opendaylight.openflowjava.protocol.impl.core;
 import static org.junit.Assert.assertNotNull;
 
 import java.io.InputStream;
-import org.junit.Before;
 import org.junit.Test;
-import org.mockito.MockitoAnnotations;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
 
 /**
@@ -22,15 +20,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.P
  * @author jameshall
  */
 public class SslKeyStoreTest {
-
-    /**
-     * Sets up test environment.
-     */
-    @Before
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-    }
-
     /**
      * Test keystore file access - via classpath.
      */