graph_test: make sure graph is validated