@Test
public void testReadYamlFromString() {

    ChatAlyticsConfig config = new ChatAlyticsConfig();
    config.inputType = InputSourceType.SLACK;
    SlackConfig slackConfig = new SlackConfig();
    slackConfig.baseAPIURL = "http://test/url";
    config.computeConfig.chatConfig = slackConfig;
    String configStr = YamlUtils.writeYaml(config);
    ChatAlyticsConfig readConfig = YamlUtils.readChatAlyticsConfigFromString(configStr);
    assertEquals(config.inputType, readConfig.inputType);
    assertEquals(config.timeZone, readConfig.timeZone);
    ChatConfig readChatConfig = readConfig.computeConfig.chatConfig;
    assertTrue(readChatConfig instanceof SlackConfig);
    assertEquals(slackConfig.getBaseAPIURL(), readChatConfig.getBaseAPIURL());
}