Test Graph implementation for directed weighted graphs