/**
 * File Name: WebsocketClientTest.java
 * 
 * Copyright (c) 2017 BISON Schweiz AG, All Rights Reserved.
 */

package net.reini.ws;

import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.net.URI;

import javax.websocket.ContainerProvider;
import javax.websocket.DeploymentException;
import javax.websocket.Session;
import javax.websocket.WebSocketContainer;

import org.junit.Test;

/**
 * Websocket integration test.
 *
 * @author Patrick Reinhart
 */
public class WebsocketClientTest {

  @Test
  public void testNonSSL() throws DeploymentException, IOException {
    WebSocketContainer container = ContainerProvider.getWebSocketContainer();
    Session session = container.connectToServer(new WebsocketClient(), URI.create("ws://echo.websocket.org/"));
    assertTrue(session.isOpen());
    session.getBasicRemote().sendText("hallo");
    session.close();
  }

  @Test
  public void testSSLconnect() throws DeploymentException, IOException {
    WebSocketContainer container = ContainerProvider.getWebSocketContainer();
    Session session = container.connectToServer(new WebsocketClient(), URI.create("wss://echo.websocket.org/"));
    assertTrue(session.isOpen());
    session.getBasicRemote().sendText("hallo");
    session.close();
  }
}

@@ -129,16 +129,17 @@
 ni.ws;%0A%0A
+%0A
 import s
@@ -158,14 +158,30 @@
 nit.
+jupiter.api.
 Assert
+ions
 .ass
@@ -423,13 +423,96 @@
 nit.
-Test;
+jupiter.api.Test;%0Aimport org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;%0A
 %0A%0A/*
@@ -615,16 +615,85 @@
 Test %7B%0A%0A
+  @DisabledIfEnvironmentVariable(named = %22TRAVIS%22, matches = %22true%22)%0A
   @Test%0A
@@ -835,32 +835,37 @@
 ontainer();%0A    
+try (
 Session session 
@@ -857,32 +857,40 @@
 ession session =
+%0A       
  container.conne
@@ -954,38 +954,42 @@
 ebsocket.org/%22))
-;
+) %7B
 %0A    
+  
 assertTrue(sessi
@@ -994,32 +994,34 @@
 sion.isOpen());%0A
+  
     session.getB
@@ -1056,37 +1056,91 @@
 %22);%0A    
-session.close();%0A  %7D%0A
+%7D%0A  %7D%0A%0A  @DisabledIfEnvironmentVariable(named = %22TRAVIS%22, matches = %22true%22)
 %0A  @Test
@@ -1295,16 +1295,21 @@
 ();%0A    
+try (
 Session 
@@ -1317,16 +1317,24 @@
 ession =
+%0A       
  contain
@@ -1415,18 +1415,22 @@
 .org/%22))
+)
-;%0A
+ %7B%0A  
     asse
@@ -1451,24 +1451,26 @@
 .isOpen());%0A
+  
     session.
@@ -1513,24 +1513,9 @@
     
-session.close();
+%7D
 %0A  %7D

Disable methods on travis