super.tearDown();
}
@Test
public void testCreateSecurityGroup() throws Exception {
DelegateExecution execution = mock(DelegateExecution.class);
final ImmutableSet<Rule> ingressRules = ImmutableSet.of(
Rule.builder().anySource().icmp().createRule(),
Rule.builder().anySource().port(22).tcp().createRule(),
Rule.builder().anySource().port(53).udp().createRule()
);
final Network network = Network.builder().ingress(ingressRules).createNetwork();
Pool pool = mock(Pool.class);
when(pool.getProvider()).thenReturn(provider);
when(pool.getNetwork()).thenReturn(network);
when(execution.getVariable(CoreProcessVariables.POOL)).thenReturn(pool);
when(execution.getProcessBusinessKey()).thenReturn(BUSINESS_KEY);
activity.execute(execution);
assertSecurityGroupExistsWithRules(SECURITY_GROUP_NAME, ingressRules);
/* If any permissions is removed it should converge on a second run */