@Test public void testExecute_WhenSDNThrowsException_ThrowsUnhandledException() throws Exception { DistributedApplianceInstance dai = createAndRegisterDAI(); RegisterK8sDAIInspectionPortTask task = this.factory.create(dai); mockRegisterInspectionPortNetworkElement(dai, new IllegalStateException()); this.exception.expect(IllegalStateException.class); task.execute(); verify(this.em, never()).merge(any(DistributedApplianceInstance.class)); }
public RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai) { RegisterK8sDAIInspectionPortTask task = new RegisterK8sDAIInspectionPortTask(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; task.apiFactoryService = this.apiFactoryService; task.dai = dai; return task; }
RegisterK8sDAIInspectionPortTask extends TransactionalTask { public RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai) { RegisterK8sDAIInspectionPortTask task = new RegisterK8sDAIInspectionPortTask(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; task.apiFactoryService = this.apiFactoryService; task.dai = dai; return task; } }
RegisterK8sDAIInspectionPortTask extends TransactionalTask { public RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai) { RegisterK8sDAIInspectionPortTask task = new RegisterK8sDAIInspectionPortTask(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; task.apiFactoryService = this.apiFactoryService; task.dai = dai; return task; }  }
RegisterK8sDAIInspectionPortTask extends TransactionalTask { public RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai) { RegisterK8sDAIInspectionPortTask task = new RegisterK8sDAIInspectionPortTask(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; task.apiFactoryService = this.apiFactoryService; task.dai = dai; return task; }  RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
RegisterK8sDAIInspectionPortTask extends TransactionalTask { public RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai) { RegisterK8sDAIInspectionPortTask task = new RegisterK8sDAIInspectionPortTask(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; task.apiFactoryService = this.apiFactoryService; task.dai = dai; return task; }  RegisterK8sDAIInspectionPortTask create(DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }