@Test(expected = IOException.class)
public void testGetRealtimeWebSocketURI_withoutURLInResponse() throws Exception {

    // RTM start
    WebResource mockRtmResrc = mock(WebResource.class);
    when(mockResource.path("rtm.start")).thenReturn(mockRtmResrc);
    String rtmResponseStr = "{malformedJSON";
    doReturn(rtmResponseStr).when(underTest).getJsonResultWithRetries(mockRtmResrc, apiRetries);
    try {
        underTest.getRealtimeWebSocketURI();
    } catch (Exception e) {
        throw (Exception) e.getCause();
    }
}