write the unit tests for undirected graph