@Test
public void createSecurityGroupTestWithTestingFlag() throws KaramelException {

  //Initializing and mocking need for method test
  SecurityGroupRule rule = mock(SecurityGroupRule.class);
  String uniqueGroup = NovaSetting.NOVA_UNIQUE_GROUP_NAME(clusterName, groupName);
  String uniqueDescription = NovaSetting.NOVA_UNIQUE_GROUP_DESCRIPTION(clusterName, groupName);
  Ingress ingress = Ingress.builder()
          .fromPort(0)
          .toPort(65535)
          .ipProtocol(IpProtocol.TCP)
          .build();
  when(novaContext.getSecurityGroupApi()).thenReturn(securityGroupApi);
  when(securityGroupApi.createWithDescription(uniqueGroup, uniqueDescription)).thenReturn(securityGroupCreated);
  when(securityGroupCreated.getId()).thenReturn("10");
  when(securityGroupApi.createRuleAllowingCidrBlock("10", ingress, "0.0.0.0/0")).thenReturn(rule);
  NovaLauncher novaLauncher = new NovaLauncher(novaContext, sshKeyPair);
  String groupId = novaLauncher.createSecurityGroup(clusterName, groupName, nova, ports);
  assertEquals("10", groupId);
}