given(awsStackUtil.createCloudFormationClient(Regions.DEFAULT_REGION, (AwsCredential) credential)).willReturn(amazonCloudFormationClient);
given(amazonCloudFormationClient.describeStacks(any(DescribeStacksRequest.class))).willThrow(e);
given(awsStackUtil.createEC2Client(Regions.DEFAULT_REGION, (AwsCredential) credential)).willReturn(ec2Client);
given(ec2Client.describeInstances(any(DescribeInstancesRequest.class))).willReturn(instancesResult);
// WHEN
StackDescription result = underTest.describeStackWithResources(stack, credential);
// THEN
verify(ec2Client, times(1)).describeInstances(any(DescribeInstancesRequest.class));
assertTrue(result.getClass().isAssignableFrom(DetailedAwsStackDescription.class));
}