test_class.declarator: workerExecutionMonitorService
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      WorkerExecutionMonitorService workerExecutionMonitorService;
test_class.type: WorkerExecutionMonitorService
test_class.var_name: workerExecutionMonitorService
test_class.declarator: eventBus
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      EventBus eventBus;
test_class.type: EventBus
test_class.var_name: eventBus
test_class.declarator: workerMonitors
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      WorkerMonitors workerMonitors;
test_class.type: WorkerMonitors
test_class.var_name: workerMonitors
test_class.file: worker/worker-manager/score-worker-manager-impl/src/test/java/io/cloudslang/worker/management/services/WorkerExecutionMonitorServiceImplTest.java
test_class.identifier: WorkerExecutionMonitorServiceImplTest
test_case.body: @Test
      public void testWorkerExecutionMonitorServiceCollectMonitor() throws InterruptedException {
          HashMap<WorkerMonitorInfoEnum, Serializable> monitorInfo = new HashMap<>();
          when(workerMonitors.getMonitorInfo()).thenReturn(monitorInfo);
  
          ScoreEvent scoreEvent = new ScoreEvent(EventConstants.WORKER_EXECUTION_MONITOR, monitorInfo);
  
          workerExecutionMonitorService.collectMonitorInformation();
          verify(eventBus, times(1)).dispatch(refEq(scoreEvent));
      }
test_case.class_method_signature: WorkerExecutionMonitorServiceImplTest.testWorkerExecutionMonitorServiceCollectMonitor()
test_case.full_signature: @Test public void testWorkerExecutionMonitorServiceCollectMonitor()
test_case.identifier: testWorkerExecutionMonitorServiceCollectMonitor
test_case.invocations: thenReturn when getMonitorInfo collectMonitorInformation dispatch verify times refEq
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWorkerExecutionMonitorServiceCollectMonitor()
focal_class.declarator: logger = Logger.getLogger(WorkerExecutionMonitorServiceImpl.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Logger logger = Logger.getLogger(WorkerExecutionMonitorServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: eventBus
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EventBus eventBus;
focal_class.type: EventBus
focal_class.var_name: eventBus
focal_class.declarator: workerMonitors
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private WorkerMonitors workerMonitors;
focal_class.type: WorkerMonitors
focal_class.var_name: workerMonitors
focal_class.declarator: scheduledWorkerMonitors
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private List<ScheduledWorkerMonitor> scheduledWorkerMonitors;
focal_class.type: List<ScheduledWorkerMonitor>
focal_class.var_name: scheduledWorkerMonitors
focal_class.file: worker/worker-manager/score-worker-manager-impl/src/main/java/io/cloudslang/worker/management/services/WorkerExecutionMonitorServiceImpl.java
focal_class.identifier: WorkerExecutionMonitorServiceImpl
focal_class.interfaces: implements WorkerExecutionMonitorService
focal_class.class_method_signature: WorkerExecutionMonitorServiceImpl.collectMonitorInformation()
focal_class.full_signature: @Override public void collectMonitorInformation()
focal_class.identifier: collectMonitorInformation
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void collectMonitorInformation()
focal_class.class_method_signature: WorkerExecutionMonitorServiceImpl.executeScheduledWorkerMonitors()
focal_class.full_signature: @Override public void executeScheduledWorkerMonitors()
focal_class.identifier: executeScheduledWorkerMonitors
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void executeScheduledWorkerMonitors()
focal_method.body: @Override
      public void collectMonitorInformation() {
          if(logger.isDebugEnabled()) {
              logger.debug("Collecting Worker Monitors");
          }
          try {
              Map<WorkerMonitorInfoEnum, Serializable> monitorInfo = workerMonitors.getMonitorInfo();
              if(logger.isDebugEnabled()) {
                  logger.debug("Sending Worker Monitors Info:[" + monitorInfo +"]");
              }
              ScoreEvent event = new ScoreEvent(EventConstants.WORKER_EXECUTION_MONITOR, (Serializable) monitorInfo);
              eventBus.dispatch(event);
          } catch (InterruptedException e) {
              logger.error("Failed to dispatch monitor info event", e);
          }
      }
focal_method.class_method_signature: WorkerExecutionMonitorServiceImpl.collectMonitorInformation()
focal_method.full_signature: @Override public void collectMonitorInformation()
focal_method.identifier: collectMonitorInformation
focal_method.invocations: isDebugEnabled debug getMonitorInfo isDebugEnabled debug dispatch error
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void collectMonitorInformation()