### Question:
LaunchConfigurationHandler { public List<LaunchConfiguration> getLaunchConfigurations(AmazonAutoScalingClient autoScalingClient, Collection<AutoScalingGroup> scalingGroups) { DescribeLaunchConfigurationsRequest launchConfigurationsRequest = new DescribeLaunchConfigurationsRequest(); launchConfigurationsRequest.setLaunchConfigurationNames( scalingGroups.stream().map(AutoScalingGroup::getLaunchConfigurationName).collect(Collectors.toList())); return autoScalingClient.describeLaunchConfigurations(launchConfigurationsRequest).getLaunchConfigurations(); }  List<LaunchConfiguration> getLaunchConfigurations(AmazonAutoScalingClient autoScalingClient, Collection<AutoScalingGroup> scalingGroups); String createNewLaunchConfiguration(String imageName, AmazonAutoScalingClient autoScalingClient,
            LaunchConfiguration oldLaunchConfiguration, CloudContext cloudContext, String encryptedImageName); void removeOldLaunchConfiguration(LaunchConfiguration oldLaunchConfiguration, AmazonAutoScalingClient autoScalingClient,
            CloudContext cloudContext);  }### Answer:
@Test public void getLaunchConfigurations() { when(autoScalingClient.describeLaunchConfigurations(any(DescribeLaunchConfigurationsRequest.class))) .thenReturn(new DescribeLaunchConfigurationsResult()); Collection<AutoScalingGroup> autoScalingGroups = Lists.newArrayList(new AutoScalingGroup().withLaunchConfigurationName("a"), new AutoScalingGroup().withLaunchConfigurationName("b")); underTest.getLaunchConfigurations(autoScalingClient, autoScalingGroups); ArgumentCaptor<DescribeLaunchConfigurationsRequest> captor = ArgumentCaptor.forClass(DescribeLaunchConfigurationsRequest.class); verify(autoScalingClient, times(1)).describeLaunchConfigurations(captor.capture()); assertEquals(autoScalingGroups.size(), captor.getValue().getLaunchConfigurationNames().size()); }