@Test public void doNothingWhenFsmNotFound() { service.handleInstallRulesResponse(KEY); verifyZeroInteractions(carrier); verifyZeroInteractions(commandBuilder); }
@Override public void handleInstallRulesResponse(String key) { SwitchSyncFsm fsm = fsms.get(key); if (fsm == null) { logFsmNotFound(key); return; } fsm.fire(SwitchSyncEvent.RULES_INSTALLED); process(fsm); }
SwitchSyncServiceImpl implements SwitchSyncService { @Override public void handleInstallRulesResponse(String key) { SwitchSyncFsm fsm = fsms.get(key); if (fsm == null) { logFsmNotFound(key); return; } fsm.fire(SwitchSyncEvent.RULES_INSTALLED); process(fsm); } }
SwitchSyncServiceImpl implements SwitchSyncService { @Override public void handleInstallRulesResponse(String key) { SwitchSyncFsm fsm = fsms.get(key); if (fsm == null) { logFsmNotFound(key); return; } fsm.fire(SwitchSyncEvent.RULES_INSTALLED); process(fsm); } SwitchSyncServiceImpl(SwitchManagerCarrier carrier, PersistenceManager persistenceManager,
                                 FlowResourcesConfig flowResourcesConfig); }
SwitchSyncServiceImpl implements SwitchSyncService { @Override public void handleInstallRulesResponse(String key) { SwitchSyncFsm fsm = fsms.get(key); if (fsm == null) { logFsmNotFound(key); return; } fsm.fire(SwitchSyncEvent.RULES_INSTALLED); process(fsm); } SwitchSyncServiceImpl(SwitchManagerCarrier carrier, PersistenceManager persistenceManager,
                                 FlowResourcesConfig flowResourcesConfig); @Override void handleSwitchSync(String key, SwitchValidateRequest request, ValidationResult validationResult); @Override void handleInstallRulesResponse(String key); @Override void handleRemoveRulesResponse(String key); @Override void handleReinstallDefaultRulesResponse(String key, FlowReinstallResponse response); @Override void handleRemoveMetersResponse(String key); @Override void handleTaskTimeout(String key); @Override void handleTaskError(String key, ErrorMessage message); }
SwitchSyncServiceImpl implements SwitchSyncService { @Override public void handleInstallRulesResponse(String key) { SwitchSyncFsm fsm = fsms.get(key); if (fsm == null) { logFsmNotFound(key); return; } fsm.fire(SwitchSyncEvent.RULES_INSTALLED); process(fsm); } SwitchSyncServiceImpl(SwitchManagerCarrier carrier, PersistenceManager persistenceManager,
                                 FlowResourcesConfig flowResourcesConfig); @Override void handleSwitchSync(String key, SwitchValidateRequest request, ValidationResult validationResult); @Override void handleInstallRulesResponse(String key); @Override void handleRemoveRulesResponse(String key); @Override void handleReinstallDefaultRulesResponse(String key, FlowReinstallResponse response); @Override void handleRemoveMetersResponse(String key); @Override void handleTaskTimeout(String key); @Override void handleTaskError(String key, ErrorMessage message);  }