@Override
protected void setUpDependencies(@NotNull ModifiableRootModel rootModel, @NotNull IdeaAndroidUnitTest androidUnitTest, @NotNull List<Message> errorsFound) {
JavaArtifact selectedTestJavaArtifact = androidUnitTest.getSelectedTestJavaArtifact();
if (selectedTestJavaArtifact != null) {
Dependencies dependencies = selectedTestJavaArtifact.getDependencies();
for (JavaLibrary library : dependencies.getJavaLibraries()) {
updateDependency(rootModel, library.getJarFile());
}
for (AndroidLibrary library : dependencies.getLibraries()) {
updateDependency(rootModel, library.getFolder());
}
for (String project : dependencies.getProjects()) {
updateDependency(rootModel, project, errorsFound);
}
} else {
oldSetUpDependencies(rootModel, androidUnitTest, errorsFound);
}