Add test case for removing unused dependencies on whitelisted update