### Question:
InstanceGroupV1ToInstanceGroupV4Converter { public List<InstanceGroupV4Request> convertTo(Set<InstanceGroupV1Request> instanceGroups, DetailedEnvironmentResponse environment) { return instanceGroups.stream().map(ig -> convert(ig, environment)).collect(Collectors.toList()); }  List<InstanceGroupV4Request> convertTo(Set<InstanceGroupV1Request> instanceGroups, DetailedEnvironmentResponse environment); Set<InstanceGroupV1Request> convertFrom(List<InstanceGroupV4Request> instanceGroups);  }### Answer:
@Test void convertToAwsWithoutSecurityGroupsHappyPathTest() { Set<InstanceGroupV1Request> instanceGroups = prepareInstanceGroups(InstanceGroupType.CORE); List<InstanceGroupV4Request> results = underTest.convertTo(instanceGroups, null); assertThat(results).hasSameSizeAs(instanceGroups); InstanceGroupV4Request first = results.get(0); assertThat(first.getAws()).isEqualTo(AWS_INSTANCE_GROUP_V4_PARAMETERS); assertThat(first.getCloudPlatform()).isEqualTo(CloudPlatform.AWS); assertThat(first.getName()).isEqualTo(INSTANE_GROUP_NAME); assertThat(first.getNodeCount()).isEqualTo(NODE_COUNT_1); assertThat(first.getRecipeNames()).isEqualTo(RECIPE_NAMES); assertThat(first.getRecoveryMode()).isEqualTo(RecoveryMode.AUTO); assertThat(first.getTemplate()).isEqualTo(INSTENCE_TEMPLATE_V4_REQUEST); assertThat(first.getType()).isEqualTo(InstanceGroupType.CORE); }