@Test
public void testValidifyUrl() {

    String url = "ws://cba.com/api/v1/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("ws://cba.com/api/v1/wsock/websocket");
    
    url = "http://prod.vantiq.com/api/v1/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("ws://prod.vantiq.com/api/v1/wsock/websocket");
    url = "http://prod.vantiq.com/";
    url = client.validifyUrl(url);
    assert url.equals("ws://prod.vantiq.com/api/v1/wsock/websocket");
    url = "http://prod.vantiq.com/api/v/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("ws://prod.vantiq.com/api/v/wsock/websocket/api/v1/wsock/websocket");
    url = "http://prod.vantiq.com/api/v47/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("ws://prod.vantiq.com/api/v47/wsock/websocket");
    
    url = "https://dev.vantiq.com";
    url = client.validifyUrl(url);
    assert url.equals("wss://dev.vantiq.com/api/v1/wsock/websocket");
    
    url = "https://dev.vantiq.com/";
    url = client.validifyUrl(url);
    assert url.equals("wss://dev.vantiq.com/api/v1/wsock/websocket");
    
    url = "dev.vantiq.com";
    url = client.validifyUrl(url);
    assert url.equals("wss://dev.vantiq.com/api/v1/wsock/websocket");
    url = "https://prod.vantiq.com/api/v1/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("wss://prod.vantiq.com/api/v1/wsock/websocket");
    url = "https://prod.vantiq.com/";
    url = client.validifyUrl(url);
    assert url.equals("wss://prod.vantiq.com/api/v1/wsock/websocket");
    url = "https://prod.vantiq.com/api/v/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("wss://prod.vantiq.com/api/v/wsock/websocket/api/v1/wsock/websocket");
    url = "https://prod.vantiq.com/api/v47/wsock/websocket";
    url = client.validifyUrl(url);
    assert url.equals("wss://prod.vantiq.com/api/v47/wsock/websocket");
}