@Test public void testGetDcaBaseResourceModels() { final List<DcaBaseResourceModel> models = getDcaBaseResourceModels(asList(BR_UUID_1, BR_UUID_2), asList(CI_TYPE_1, CI_TYPE_2), asList(BRT_UUID_1, BRT_UUID_2)); final List<DcaBaseResourceModel> expected = asList(new DcaBaseResourceModel(BR_UUID_1, CI_TYPE_1, BRT_UUID_1), new DcaBaseResourceModel(BR_UUID_2, CI_TYPE_2, BRT_UUID_2)); assertEquals(expected, models); }
@NotNull public static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids, @NotNull final List<String> baseResourceCiTypes, @NotNull final List<String> baseResourceTypeUuids) { final Iterator<String> baseResourceUuidsIter = baseResourceUuids.iterator(); final Iterator<String> baseResourceCiTypesIter = baseResourceCiTypes.iterator(); final Iterator<String> baseResourceTypeUuidsIter = baseResourceTypeUuids.iterator(); final List<DcaBaseResourceModel> dcaBaseResources = new ArrayList<>(); while (baseResourceUuidsIter.hasNext() && baseResourceCiTypesIter.hasNext() && baseResourceTypeUuidsIter.hasNext()) { dcaBaseResources.add(new DcaBaseResourceModel(baseResourceUuidsIter.next(), baseResourceCiTypesIter.next(), baseResourceTypeUuidsIter.next())); } return dcaBaseResources; }
CreateResourceJSONController { @NotNull public static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids, @NotNull final List<String> baseResourceCiTypes, @NotNull final List<String> baseResourceTypeUuids) { final Iterator<String> baseResourceUuidsIter = baseResourceUuids.iterator(); final Iterator<String> baseResourceCiTypesIter = baseResourceCiTypes.iterator(); final Iterator<String> baseResourceTypeUuidsIter = baseResourceTypeUuids.iterator(); final List<DcaBaseResourceModel> dcaBaseResources = new ArrayList<>(); while (baseResourceUuidsIter.hasNext() && baseResourceCiTypesIter.hasNext() && baseResourceTypeUuidsIter.hasNext()) { dcaBaseResources.add(new DcaBaseResourceModel(baseResourceUuidsIter.next(), baseResourceCiTypesIter.next(), baseResourceTypeUuidsIter.next())); } return dcaBaseResources; } }
CreateResourceJSONController { @NotNull public static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids, @NotNull final List<String> baseResourceCiTypes, @NotNull final List<String> baseResourceTypeUuids) { final Iterator<String> baseResourceUuidsIter = baseResourceUuids.iterator(); final Iterator<String> baseResourceCiTypesIter = baseResourceCiTypes.iterator(); final Iterator<String> baseResourceTypeUuidsIter = baseResourceTypeUuids.iterator(); final List<DcaBaseResourceModel> dcaBaseResources = new ArrayList<>(); while (baseResourceUuidsIter.hasNext() && baseResourceCiTypesIter.hasNext() && baseResourceTypeUuidsIter.hasNext()) { dcaBaseResources.add(new DcaBaseResourceModel(baseResourceUuidsIter.next(), baseResourceCiTypesIter.next(), baseResourceTypeUuidsIter.next())); } return dcaBaseResources; }  }
CreateResourceJSONController { @NotNull public static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids, @NotNull final List<String> baseResourceCiTypes, @NotNull final List<String> baseResourceTypeUuids) { final Iterator<String> baseResourceUuidsIter = baseResourceUuids.iterator(); final Iterator<String> baseResourceCiTypesIter = baseResourceCiTypes.iterator(); final Iterator<String> baseResourceTypeUuidsIter = baseResourceTypeUuids.iterator(); final List<DcaBaseResourceModel> dcaBaseResources = new ArrayList<>(); while (baseResourceUuidsIter.hasNext() && baseResourceCiTypesIter.hasNext() && baseResourceTypeUuidsIter.hasNext()) { dcaBaseResources.add(new DcaBaseResourceModel(baseResourceUuidsIter.next(), baseResourceCiTypesIter.next(), baseResourceTypeUuidsIter.next())); } return dcaBaseResources; }  @NotNull static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids,
                                                                      @NotNull final List<String> baseResourceCiTypes,
                                                                      @NotNull final List<String> baseResourceTypeUuids); @NotNull static List<DcaDeploymentParameterModel> getDcaDeploymentParameterModels(
            @NotNull final List<String> deploymentParameterNames,
            @NotNull final List<String> deploymentParameterValues); }
CreateResourceJSONController { @NotNull public static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids, @NotNull final List<String> baseResourceCiTypes, @NotNull final List<String> baseResourceTypeUuids) { final Iterator<String> baseResourceUuidsIter = baseResourceUuids.iterator(); final Iterator<String> baseResourceCiTypesIter = baseResourceCiTypes.iterator(); final Iterator<String> baseResourceTypeUuidsIter = baseResourceTypeUuids.iterator(); final List<DcaBaseResourceModel> dcaBaseResources = new ArrayList<>(); while (baseResourceUuidsIter.hasNext() && baseResourceCiTypesIter.hasNext() && baseResourceTypeUuidsIter.hasNext()) { dcaBaseResources.add(new DcaBaseResourceModel(baseResourceUuidsIter.next(), baseResourceCiTypesIter.next(), baseResourceTypeUuidsIter.next())); } return dcaBaseResources; }  @NotNull static List<DcaBaseResourceModel> getDcaBaseResourceModels(@NotNull final List<String> baseResourceUuids,
                                                                      @NotNull final List<String> baseResourceCiTypes,
                                                                      @NotNull final List<String> baseResourceTypeUuids); @NotNull static List<DcaDeploymentParameterModel> getDcaDeploymentParameterModels(
            @NotNull final List<String> deploymentParameterNames,
            @NotNull final List<String> deploymentParameterValues);  }