test_class.declarator: notifier = null
test_class.modifier: protected
test_class.original_string: protected ESXiNotifier notifier = null;
test_class.type: ESXiNotifier
test_class.var_name: notifier
test_class.file: vsm/src/test/java/com/abiquo/vsm/redis/pubsub/notifier/impl/TestESXiNotifier.java
test_class.identifier: TestESXiNotifier
test_class.superclass: extends TestNotifierBase<ESXiNotifier>
test_case.body: @Test
      public void test_invalidEvents()
      {
          VirtualMachine vm = new VirtualMachine();
          PhysicalMachine pm0 = new PhysicalMachine();
          PhysicalMachine pm1 = new PhysicalMachine();
  
          pm0.setId(0);
          pm0.setAddress("http://10.30.1.203:443/");
          pm0.setUsername("");
          pm0.setPassword("");
          pm0.setType(Type.VMX_04.name());
  
          pm1.setId(1);
          pm1.setAddress("http://10.30.1.205:443/");
          pm1.setUsername("");
          pm1.setPassword("");
          pm1.setType(Type.VMX_04.name());
  
          vm.setId(0);
          vm.setLastKnownState(null);
          vm.setName("ABQ_" + UUID.randomUUID().toString());
          vm.setPhysicalMachine(pm0);
  
          List<VirtualSystemEvent> notifications;
  
          // Invalid event when vm.getPhysicalMachine is not the same that generated the current
          // event.
          notifications = notifier.processEvent(vm, pm1, VMEventType.POWER_ON);
          assertTrue(notifications.isEmpty());
  
          notifications = notifier.processEvent(vm, pm1, VMEventType.POWER_OFF);
          assertTrue(notifications.isEmpty());
  
          notifications = notifier.processEvent(vm, pm1, VMEventType.PAUSED);
          assertTrue(notifications.isEmpty());
  
          notifications = notifier.processEvent(vm, pm1, VMEventType.RESUMED);
          assertTrue(notifications.isEmpty());
      }
test_case.class_method_signature: TestESXiNotifier.test_invalidEvents()
test_case.full_signature: @Test public void test_invalidEvents()
test_case.identifier: test_invalidEvents
test_case.invocations: setId setAddress setUsername setPassword setType name setId setAddress setUsername setPassword setType name setId setLastKnownState setName toString randomUUID setPhysicalMachine processEvent assertTrue isEmpty processEvent assertTrue isEmpty processEvent assertTrue isEmpty processEvent assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_invalidEvents()
focal_class.declarator: logger = LoggerFactory.getLogger(ESXiNotifier.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger logger = LoggerFactory.getLogger(ESXiNotifier.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: vsm/src/main/java/com/abiquo/vsm/redis/pubsub/notifier/impl/ESXiNotifier.java
focal_class.identifier: ESXiNotifier
focal_class.class_method_signature: ESXiNotifier.processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_class.full_signature: @Override public List<VirtualSystemEvent> processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_class.identifier: processEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_class.return: List<VirtualSystemEvent>
focal_class.signature: List<VirtualSystemEvent> processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_class.superclass: extends GenericNotifier
focal_method.body: @Override
      public List<VirtualSystemEvent> processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
      {
          logger.trace(String.format("Processing %s %s event from machine %s",
              virtualMachine.getName(), event.name(), machine.getAddress()));
  
          List<VirtualSystemEvent> notifications = new ArrayList<VirtualSystemEvent>();
  
          switch (event)
          {
              case CREATED:
                  notifications.addAll(deduceMoveEvent(virtualMachine, machine, event));
                  break;
  
              case POWER_ON:
              case POWER_OFF:
              case PAUSED:
              case RESUMED:
              case DESTROYED:
  
                  if (samePhysicalMachineAddress(virtualMachine.getPhysicalMachine(), machine)
                      && !alreadyNotified(virtualMachine, event))
                  {
                      notifications.add(buildVirtualSystemEvent(virtualMachine, event));
                  }
  
                  break;
  
              default:
                  break;
          }
  
          return notifications;
      }
focal_method.class_method_signature: ESXiNotifier.processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_method.full_signature: @Override public List<VirtualSystemEvent> processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_method.identifier: processEvent
focal_method.invocations: trace format getName name getAddress addAll deduceMoveEvent samePhysicalMachineAddress getPhysicalMachine alreadyNotified add buildVirtualSystemEvent
focal_method.modifiers: @Override public
focal_method.parameters: (final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)
focal_method.return: List<VirtualSystemEvent>
focal_method.signature: List<VirtualSystemEvent> processEvent(final VirtualMachine virtualMachine,
          final PhysicalMachine machine, final VMEventType event)