Fixed all the tests to use graphs.