@Test public void testExecute_WhenInspectionPortIsRegistered_DAIIsUpdated() throws Exception { DistributedApplianceInstance dai = createAndRegisterDAI(); RegisterK8sDAIInspectionPortTask task = this.factory.create(dai); String inspectionPortId = mockRegisterInspectionPortNetworkElement(dai); task.execute(); Assert.assertEquals("The inspection element id was different than expected.", inspectionPortId, dai.getInspectionElementId()); verify(this.em, times(1)).merge(dai); }
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();  }