Added model for dependency graph and a test function in apicontroller