@Test public void testExecute_WhenSDNReturnsNetworkElement_NoOrphanDAI_DAICreatedWithoutInspectionElementId() throws Exception { KubernetesPod k8sPod = createKubernetesPod(); DefaultNetworkPort podPort = createNetworkElement(); podPort.setParentId(UUID.randomUUID().toString()); DeploymentSpec ds = createAndRegisterDeploymentSpec(null); registerNetworkElement(ds, podPort, k8sPod); CreateOrUpdateK8sDAITask task = this.factory.create(ds, k8sPod); task.execute(); verify(this.em, Mockito.times(1)).persist(Mockito.argThat(new DAIMatcher(podPort, k8sPod, null, podPort.getParentId()))); verify(this.em, Mockito.never()).remove(Mockito.any(DistributedApplianceInstance.class)); }
public CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod) { return create(ds, k8sPod, null); }
CreateOrUpdateK8sDAITask extends TransactionalTask { public CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod) { return create(ds, k8sPod, null); } }
CreateOrUpdateK8sDAITask extends TransactionalTask { public CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod) { return create(ds, k8sPod, null); }  }
CreateOrUpdateK8sDAITask extends TransactionalTask { public CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod) { return create(ds, k8sPod, null); }  CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
CreateOrUpdateK8sDAITask extends TransactionalTask { public CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod) { return create(ds, k8sPod, null); }  CreateOrUpdateK8sDAITask create(DeploymentSpec ds, KubernetesPod k8sPod); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }