Added test for vertex degree calculation