Testing a graph