@Test
public void testFindComponent() {

	Graphs g = new Graphs();
	Assert.assertNull( ComponentHelpers.findComponent( g, "c" ));
	Component c1 = new Component( "c1" );
	g.getRootComponents().add( c1 );
	Assert.assertEquals( c1, ComponentHelpers.findComponent( g, "c1" ));
	Component c2 = new Component( "c2" );
	g.getRootComponents().add( c2 );
	Assert.assertEquals( c2, ComponentHelpers.findComponent( g, "c2" ));
	Component c21 = new Component( "c21" );
	c2.addChild( c21 );
	Assert.assertEquals( c21, ComponentHelpers.findComponent( g, "c21" ));
	Component duplicateC1 = new Component( "c1" );
	g.getRootComponents().add( duplicateC1 );
	Assert.assertNotNull( ComponentHelpers.findComponent( g, "c1" ));
	TestApplication app = new TestApplication();
	Assert.assertNotNull( ComponentHelpers.findComponent( app, "tomcat" ));
	Assert.assertNull( ComponentHelpers.findComponent( app, "tommy" ));
}