Test graph functions