@Test public void testExecute_WhenSDNReturnsNullNetworkElement_ThrowsUnhandledException() throws Exception { CreateServiceFunctionChainTask task = this.task.create(SECURITY_GROUP_SFC, this.portPairGroup); registerNetworkElement(SECURITY_GROUP_SFC, null, new IllegalStateException()); this.exception.expect(IllegalStateException.class); task.execute(); Mockito.verify(this.em, Mockito.never()).merge(any()); }
public CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups) { CreateServiceFunctionChainTask task = new CreateServiceFunctionChainTask(); task.sfc = securityGroup.getServiceFunctionChain(); task.securityGroup = securityGroup; task.portPairGroups = portPairGroups; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
CreateServiceFunctionChainTask extends TransactionalTask { public CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups) { CreateServiceFunctionChainTask task = new CreateServiceFunctionChainTask(); task.sfc = securityGroup.getServiceFunctionChain(); task.securityGroup = securityGroup; task.portPairGroups = portPairGroups; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
CreateServiceFunctionChainTask extends TransactionalTask { public CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups) { CreateServiceFunctionChainTask task = new CreateServiceFunctionChainTask(); task.sfc = securityGroup.getServiceFunctionChain(); task.securityGroup = securityGroup; task.portPairGroups = portPairGroups; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
CreateServiceFunctionChainTask extends TransactionalTask { public CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups) { CreateServiceFunctionChainTask task = new CreateServiceFunctionChainTask(); task.sfc = securityGroup.getServiceFunctionChain(); task.securityGroup = securityGroup; task.portPairGroups = portPairGroups; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override String getName(); }
CreateServiceFunctionChainTask extends TransactionalTask { public CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups) { CreateServiceFunctionChainTask task = new CreateServiceFunctionChainTask(); task.sfc = securityGroup.getServiceFunctionChain(); task.securityGroup = securityGroup; task.portPairGroups = portPairGroups; task.apiFactory = this.apiFactory; task.name = task.getName(); task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  CreateServiceFunctionChainTask create(SecurityGroup securityGroup, List<NetworkElement> portPairGroups); @Override void executeTransaction(EntityManager em); @Override Set<LockObjectReference> getObjects(); @Override String getName();  }