"../serengeti/WebContent/WEB-INF/spring/serengeti-jobs-context.xml",
"../serengeti/WebContent/WEB-INF/spring/manager-context.xml");
context.getBean(SoftwareManagerCollector.class).loadSoftwareManagers();
clusterConfigMgr = context.getBean(ClusterConfigManager.class);
DistroManager distroMgr = Mockito.mock(DistroManager.class);
ClusteringService clusteringService =
Mockito.mock(ClusteringService.class);
mockChefServerRoles();
clusterConfigMgr.setClusteringService(clusteringService);
clusterEntityMgr =
context
.getBean("clusterEntityManager", IClusterEntityManager.class);
DistroRead distro = new DistroRead();
List<String> roles = new ArrayList<String>();
roles.add("hadoop_namenode");
roles.add("hadoop_jobtracker");
roles.add("hadoop_datanode");
roles.add("hadoop_tasktracker");
roles.add("hadoop_client");
roles.add("hive");
roles.add("hive_server");
roles.add("pig");
distro.setRoles(roles);
Mockito.when(clusteringService.getTemplateVmId()).thenReturn("vm-1234");
Mockito.when(clusteringService.getTemplateVmName()).thenReturn(
"hadoop-template");
Mockito.when(distroMgr.getDistroByName("apache")).thenReturn(distro);
Mockito.when(distroMgr.checkPackagesExistStatus("apache")).thenReturn(
PackagesExistStatus.TARBALL);
Mockito.when(