@Test
public void testGetRealtimeWebSocketURI() throws Exception {

    // RTM start
    WebResource mockRtmResrc = mock(WebResource.class);
    when(mockResource.path("rtm.start")).thenReturn(mockRtmResrc);
    String rtmResponseStr =
        "{\"ok\": true, \"url\":\"wss:\\/\\/ms9.slack-msgs.com\\/websocket\\/7I5yBpcvk\"}";
    doReturn(rtmResponseStr).when(underTest).getJsonResultWithRetries(mockRtmResrc, apiRetries);
    assertEquals(URI.create("wss://ms9.slack-msgs.com/websocket/7I5yBpcvk"),
                 underTest.getRealtimeWebSocketURI());
}