Implement undirected adjacency matrix with unit tests