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