Refactor ShutdownProvider.shutdown()
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / core / SslContextFactoryTest.java
index 862e0ca56e6f27c29e35370b79ddcc4675fbbab4..cf00ef7a168901cad547a2b5f71fe55e28e73f18 100644 (file)
@@ -5,24 +5,21 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowjava.protocol.impl.core;
 
 import static org.junit.Assert.assertNotNull;
 
+import java.util.List;
 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;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
 
-import com.google.common.collect.Lists;
-
 /**
+ * Unit tests for SslContextFactory.
  *
  * @author jameshall
  */
@@ -32,25 +29,20 @@ public class SslContextFactoryTest {
     TlsConfiguration tlsConfiguration ;
 
     /**
-     * Sets up test environment
+     * Sets up test environment.
      */
     @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")) ;
+                List.of("TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_128_CBC_SHA256"));
         sslContextFactory = new SslContextFactory(tlsConfiguration);
     }
 
-    /**
-     * @throws Exception
-     */
     @Test
-    public void testGetServerContext() throws Exception {
+    public void testGetServerContext() {
         SSLContext context  = sslContextFactory.getServerContext() ;
 
-        assertNotNull( context );
+        assertNotNull(context);
     }
-
 }