Assert.assertFalse("Expect desired config not contain 'mapred-site'", desiredConfigs.containsKey("mapred-site"));
Assert.assertTrue("Expect desired config contain " + config1.getType(), desiredConfigs.containsKey("global"));
Assert.assertTrue("Expect desired config contain " + config3.getType(), desiredConfigs.containsKey("core-site"));
Assert.assertEquals("Expect desired config for global should be " + config1.getVersionTag(),
config1.getVersionTag(), desiredConfigs.get(config1.getType()).getVersion());
DesiredConfig dc = desiredConfigs.get(config1.getType());
Assert.assertTrue("Expect no host-level overrides",
(null == dc.getHostOverrides() || dc.getHostOverrides().size() == 0));
// setup a host that also has a config override
Host host = clusters.getHost("h1");
host.addDesiredConfig(c1.getClusterId(), true, config2);
desiredConfigs = c1.getDesiredConfigs();
dc = desiredConfigs.get(config1.getType());
Assert.assertNotNull("Expect host-level overrides", dc.getHostOverrides());
Assert.assertEquals("Expect one host-level override", 1, dc.getHostOverrides().size());
}