@Test public void testExecute_WithVariousSGM_ExpectMarkedInTheEnd() throws Exception { MarkSecurityGroupInterfaceDeleteTask task = this.factoryTask.create(this.sgi); task.execute(); SecurityGroupInterface sgi = this.txControl.required(() -> this.em.find(SecurityGroupInterface.class, this.sgi.getId())); assertTrue(sgi.getMarkedForDeletion()); }
public MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi) { MarkSecurityGroupInterfaceDeleteTask task = new MarkSecurityGroupInterfaceDeleteTask(); task.sgi = sgi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
MarkSecurityGroupInterfaceDeleteTask extends TransactionalTask { public MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi) { MarkSecurityGroupInterfaceDeleteTask task = new MarkSecurityGroupInterfaceDeleteTask(); task.sgi = sgi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
MarkSecurityGroupInterfaceDeleteTask extends TransactionalTask { public MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi) { MarkSecurityGroupInterfaceDeleteTask task = new MarkSecurityGroupInterfaceDeleteTask(); task.sgi = sgi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
MarkSecurityGroupInterfaceDeleteTask extends TransactionalTask { public MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi) { MarkSecurityGroupInterfaceDeleteTask task = new MarkSecurityGroupInterfaceDeleteTask(); task.sgi = sgi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  @Override String getName(); @Override void executeTransaction(EntityManager em); MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi); }
MarkSecurityGroupInterfaceDeleteTask extends TransactionalTask { public MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi) { MarkSecurityGroupInterfaceDeleteTask task = new MarkSecurityGroupInterfaceDeleteTask(); task.sgi = sgi; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  @Override String getName(); @Override void executeTransaction(EntityManager em); MarkSecurityGroupInterfaceDeleteTask create(SecurityGroupInterface sgi);  }