[src][test] Adding in tests and implementation for empty graphs