Added unit test for graph