@Test
public void testFindRootNode() throws NodeNotExistsExeption{

	Graph<String> graph = new Graph<String>();
	graph.addNode("n1");
	graph.addNode("n2");
	graph.addNode("n3");
	graph.addNode("n4");
	graph.addNode("n5");
	graph.addNode("n6");
	graph.addEdge("n2", "n3");
	graph.addEdge("n3", "n4");
	graph.addEdge("n1", "n5");
	graph.addEdge("n2", "n6");
	assertEquals(graph.findRootNode(graph.findNode("n5")), graph.findNode("n1"));
	assertEquals(graph.findRootNode(graph.findNode("n1")), graph.findNode("n1"));
	assertNotSame(graph.findRootNode(graph.findNode("n1")), graph.findNode("n5"));
	assertEquals(graph.findRootNode(graph.findNode("n4")), graph.findNode("n2"));
}