@Test
public void testGetConfigurationValue() throws Exception {

  Cluster cluster = createNiceMock(Cluster.class);
  Config config = createNiceMock(Config.class);
  Map<String, String> properties = new HashMap<String, String>();
  properties.put("foo", "bar");
  expect(cluster.getDesiredConfigByType("core-site")).andReturn(config).anyTimes();
  expect(config.getProperties()).andReturn(properties).anyTimes();
  replay(cluster, config);
  ClusterImpl clusterImpl = new ClusterImpl(cluster);
  Assert.assertEquals("bar", clusterImpl.getConfigurationValue("core-site", "foo"));
  verify(cluster, config);
}