@Test
  public void testOldSyntax() throws Exception {
    ConfigurationFactory factory = new ConfigurationFactory();
    Configuration configuration = factory.getConfiguration(getOldSyntaxConfigProps());

    assertEquals(2, configuration.getProperties().size());

    Map<String, String> configProperties1 = configuration.getProperties().get("foo-type");
    assertEquals(2, configProperties1.size());
    assertEquals("prop1Value", configProperties1.get("prop1"));
    assertEquals("prop2Value", configProperties1.get("prop2"));

    Map<String, String> configProperties2 = configuration.getProperties().get("bar-type");
    assertEquals(1, configProperties2.size());
    assertEquals("prop3Value", configProperties2.get("prop3"));

    assertTrue(configuration.getAttributes().isEmpty());
  }
Creates a configuration instance given user specified properties.
ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationFactoryTest.java