when(db.getStagesInProgress()).thenReturn(stages);
Properties properties = new Properties();
Configuration conf = new Configuration(properties);
ActionScheduler scheduler = new ActionScheduler(100, 50, db, aq, fsm, 3,
new HostsMap((String) null), new ServerActionManagerImpl(fsm),
unitOfWork, conf);
ActionManager am = new ActionManager(
2, 2, aq, fsm, db, new HostsMap((String) null),
new ServerActionManagerImpl(fsm), unitOfWork, requestFactory, conf);
scheduler.doWork();
Assert.assertEquals(HostRoleStatus.QUEUED, stages.get(0).getHostRoleStatus(hostname1, "DATANODE"));
Assert.assertEquals(HostRoleStatus.PENDING, stages.get(1).getHostRoleStatus(hostname1, "GANGLIA_MONITOR"));