Added tests for graph methods.