@Test public void testExecute_WhenUpdateInspectionHookFails_ThrowsTheUnhandledException() throws Exception { SecurityGroup sg = newSecurityGroup(); SecurityGroupInterface sgi = registerNewSGI(sg, 2L); DistributedApplianceInstance dai = registerNewDAI(); SdnRedirectionApi redirectionApi = mockUpdateInspectionHook(sgi, dai, new IllegalStateException()); registerNetworkRedirectionApi(redirectionApi, sgi.getVirtualSystem()); this.exception.expect(IllegalStateException.class); UpdatePortGroupHookTask task = this.factory.create(sgi, dai); task.execute(); }
public UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai){ UpdatePortGroupHookTask task = new UpdatePortGroupHookTask(sgi, dai); task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
UpdatePortGroupHookTask extends BasePortGroupHookTask { public UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai){ UpdatePortGroupHookTask task = new UpdatePortGroupHookTask(sgi, dai); task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
UpdatePortGroupHookTask extends BasePortGroupHookTask { public UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai){ UpdatePortGroupHookTask task = new UpdatePortGroupHookTask(sgi, dai); task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } UpdatePortGroupHookTask(); private  UpdatePortGroupHookTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); }
UpdatePortGroupHookTask extends BasePortGroupHookTask { public UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai){ UpdatePortGroupHookTask task = new UpdatePortGroupHookTask(sgi, dai); task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } UpdatePortGroupHookTask(); private  UpdatePortGroupHookTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName(); }
UpdatePortGroupHookTask extends BasePortGroupHookTask { public UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai){ UpdatePortGroupHookTask task = new UpdatePortGroupHookTask(sgi, dai); task.apiFactoryService = this.apiFactoryService; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } UpdatePortGroupHookTask(); private  UpdatePortGroupHookTask(SecurityGroupInterface sgi, DistributedApplianceInstance dai); UpdatePortGroupHookTask create(SecurityGroupInterface sgi, DistributedApplianceInstance dai); @Override void executeTransaction(EntityManager em); @Override String getName();  }