@Test
public void itMergesNestedConfigsProperly() throws Exception {

  InputStream mergedConfigStream = buildConfigSourceProvider(DEFAULT_PATH)
      .open(OVERRIDE_PATH);
  BaragonConfiguration mergedConfig = objectMapper.readValue(
      YAML_FACTORY.createParser(mergedConfigStream),
      BaragonConfiguration.class);
  assertEquals("override-quorum", mergedConfig.getZooKeeperConfiguration().getQuorum());
  assertEquals(100, (int) mergedConfig.getZooKeeperConfiguration().getSessionTimeoutMillis());
  assertEquals("override-namespace", mergedConfig.getZooKeeperConfiguration().getZkNamespace());
  assertEquals(100, (int) mergedConfig.getZooKeeperConfiguration().getConnectTimeoutMillis());
  assertEquals(100, (int) mergedConfig.getZooKeeperConfiguration().getRetryBaseSleepTimeMilliseconds());
  assertEquals(2, mergedConfig.getAgentMaxAttempts());
  assertEquals("127.0.0.1", mergedConfig.getHostname());
  assertEquals("master-auth-key", mergedConfig.getMasterAuthKey());
}