@Test public void testConvertWhenInstanceGroupContainsTemplateAndNodeCountIsNotZeroThenUnableToObtainSkeletonSinceNoSkeletonAndInstance() { Set<InstanceGroup> instanceGroups = new LinkedHashSet<>(); InstanceGroup instanceGroup = mock(InstanceGroup.class); String groupName = TEST_NAME; Template template = new Template(); template.setVolumeTemplates(Sets.newHashSet()); instanceGroups.add(instanceGroup); when(instanceGroup.getNodeCount()).thenReturn(2); when(instanceGroup.getGroupName()).thenReturn(groupName); when(instanceGroup.getTemplate()).thenReturn(template); when(stack.getInstanceGroupsAsList()).thenReturn(new ArrayList<>(instanceGroups)); expectedException.expect(RuntimeException.class); expectedException.expectMessage(String.format("There is no skeleton and instance available for Group -> name:%s", groupName)); CloudStack result = underTest.convert(stack); assertEquals(1L, result.getGroups().size()); result.getGroups().get(0).getReferenceInstanceConfiguration(); }
public CloudStack convert(Stack stack) { return convert(stack, Collections.emptySet()); }
StackToCloudStackConverter { public CloudStack convert(Stack stack) { return convert(stack, Collections.emptySet()); } }
StackToCloudStackConverter { public CloudStack convert(Stack stack) { return convert(stack, Collections.emptySet()); }  }
StackToCloudStackConverter { public CloudStack convert(Stack stack) { return convert(stack, Collections.emptySet()); }  CloudStack convert(Stack stack); CloudStack convertForDownscale(Stack stack, Set<String> deleteRequestedInstances); CloudStack convertForTermination(Stack stack, String instanceId); CloudStack convert(Stack stack, Collection<String> deleteRequestedInstances); List<CloudInstance> buildInstances(Stack stack); CloudInstance buildInstance(InstanceMetaData instanceMetaData, InstanceGroup instanceGroup,
            StackAuthentication stackAuthentication, Long privateId, InstanceStatus status); Map<String, Object> buildCloudInstanceParameters(String environmentCrn, InstanceMetaData instanceMetaData, CloudPlatform platform); }
StackToCloudStackConverter { public CloudStack convert(Stack stack) { return convert(stack, Collections.emptySet()); }  CloudStack convert(Stack stack); CloudStack convertForDownscale(Stack stack, Set<String> deleteRequestedInstances); CloudStack convertForTermination(Stack stack, String instanceId); CloudStack convert(Stack stack, Collection<String> deleteRequestedInstances); List<CloudInstance> buildInstances(Stack stack); CloudInstance buildInstance(InstanceMetaData instanceMetaData, InstanceGroup instanceGroup,
            StackAuthentication stackAuthentication, Long privateId, InstanceStatus status); Map<String, Object> buildCloudInstanceParameters(String environmentCrn, InstanceMetaData instanceMetaData, CloudPlatform platform);  }