### Question:
Stack { public com.amazonaws.services.cloudformation.model.Stack describe() { final DescribeStacksRequest request = new DescribeStacksRequest().withStackName(name); final DescribeStacksResult result = cloudFormationClient.describeStacks(request); return result.getStacks().get(0); } Stack(final AmazonCloudFormation cloudFormationClient, final String name); StackResourceDetail describeResource(final String logicalResourceId); String physicalResourceId(final String logicalResourceId); com.amazonaws.services.cloudformation.model.Stack describe();  }### Answer:
@Test public void shouldReturnStackDescription() { final com.amazonaws.services.cloudformation.model.Stack mockStack = mock( com.amazonaws.services.cloudformation.model.Stack.class); final DescribeStacksRequest expectedRequest = new DescribeStacksRequest().withStackName(stackName); final DescribeStacksResult describeStacksResult = new DescribeStacksResult().withStacks(asList(mockStack)); when(mockCloudFormationClient.describeStacks(expectedRequest)).thenReturn(describeStacksResult); final com.amazonaws.services.cloudformation.model.Stack result = stack.describe(); assertSame(mockStack, result); }