Unit test for the Graph class