Add a unit test for upgradeDependencies method