Test the Graph protocol functions for weighted undirected graph