Task dependencies topological sort practice in Java.