final String childName = "lilmeep";
final Element element = document.createElement( name );
final Element childElement = document.createElement( childName );
element.appendChild( childElement );
final Configuration configuration = ConfigurationUtil.toConfiguration( element );
assertEquals( "configuration.getName()", name, configuration.getName() );
assertEquals( "configuration.getPath()",
ConfigurationUtil.ROOT_PATH,
configuration.getPath() );
assertEquals( "configuration.getLocation()",
"dom-gen",
configuration.getLocation() );
assertEquals( "configuration.getAttributeNames().length",
0,
configuration.getAttributeNames().length );
assertEquals( "configuration.getChildren().length",
1,
configuration.getChildren().length );
final Configuration child = configuration.getChildren()[ 0 ];
assertEquals( "child.name", childName, child.getName() );
assertEquals( "child.getPath()", "meep", child.getPath() );
}