@Test
public void testReadYamlFromResource() {

    String expectedURL = "http://test/url/from/file";
    String resource = "config/chatalytics-slack.yaml";
    ChatAlyticsConfig readConfig = YamlUtils.readChatAlyticsConfig(resource);
    assertTrue(readConfig.computeConfig.chatConfig instanceof SlackConfig);
    assertEquals(expectedURL, readConfig.computeConfig.chatConfig.getBaseAPIURL());
    resource = "config/chatalytics-hipchat.yaml";
    readConfig = YamlUtils.readChatAlyticsConfig(resource);
    assertTrue(readConfig.computeConfig.chatConfig instanceof HipChatConfig);
    assertEquals(expectedURL, readConfig.computeConfig.chatConfig.getBaseAPIURL());
    resource = "config/chatalytics-local.yaml";
    readConfig = YamlUtils.readChatAlyticsConfig(resource);
    assertTrue(readConfig.computeConfig.chatConfig instanceof LocalTestConfig);
    resource = "config/chatalytics-slackbackfill.yaml";
    readConfig = YamlUtils.readChatAlyticsConfig(resource);
    assertTrue(readConfig.computeConfig.chatConfig instanceof SlackBackfillerConfig);
    assertEquals(expectedURL, readConfig.computeConfig.chatConfig.getBaseAPIURL());
}