Unit tests for graph operations