JUnit test case for class Graph updated