Factorize test dependencies

Factorize and use DependencyManagement for test dependencies