@Test
public void testGetRooms() throws Exception {

    // channels.list
    WebResource mockChanResource = mock(WebResource.class);
    when(mockResource.path("channels.list")).thenReturn(mockChanResource);
    URI channelListURI = Resources.getResource("slack_api_responses/channels.list.txt").toURI();
    Path channelsPath = Paths.get(channelListURI);
    String channelsResponseStr = new String(Files.readAllBytes(channelsPath));
    doReturn(channelsResponseStr).when(underTest).getJsonResultWithRetries(mockChanResource,
                                                                           apiRetries);
    Map<String, Room> rooms = underTest.getRooms();
    assertEquals(1, rooms.size());
    for (Room room : rooms.values()) {
        assertNotNull(room);
    }
}