Added test for disconnected graph