@Test
public void testHttpToWs() throws URISyntaxException {

    assertURI(WSURI.toWebsocket(URI.create("http://localhost/")), URI.create("ws://localhost/"));
    assertURI(WSURI.toWebsocket(URI.create("http://localhost:8080/deeper/")), URI.create("ws://localhost:8080/deeper/"));
    assertURI(WSURI.toWebsocket("http://localhost/"), URI.create("ws://localhost/"));
    assertURI(WSURI.toWebsocket("http://localhost/", null), URI.create("ws://localhost/"));
    assertURI(WSURI.toWebsocket("http://localhost/", "a=b"), URI.create("ws://localhost/?a=b"));
}