public function addDependency(DependencyNode $node, DependencyNode $dependsOn)
    {
        if (!$this->dependencies->contains($node)) {
            $this->addNode($node);
        }
        if (!$this->dependencies->contains($dependsOn)) {
            $this->addNode($dependsOn);
        }

        if (!$this->arrayObjectContains($dependsOn, $this->dependencies[$node])) {
            $this->dependencies[$node]->append($dependsOn);
        }

        $node->dependsOn($dependsOn);
    }