@Test public void testExecute_WhenCreateNetworkRedirectionApiFails_ThrowsTheUnhandledException() throws Exception { DistributedApplianceInstance dai = registerNewDAI(1L); when(this.apiFactoryServiceMock.createNetworkRedirectionApi(dai)).thenThrow(new IllegalStateException()); DeleteInspectionPortTask task = this.factory.create("region", dai); this.exception.expect(IllegalStateException.class); task.execute(); }
public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects(); }
DeleteInspectionPortTask extends TransactionalTask { public DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai) { DeleteInspectionPortTask task = new DeleteInspectionPortTask(); task.region = region; task.dai = dai; task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  DeleteInspectionPortTask create(String region, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override Set<LockObjectReference> getObjects();  }