Compute Group dependencies
Use JGraphT for graph manipulation
Add test cases