test/graph: add functional tests