class EmrDaoImpl implements EmrDao {

    protected List<InstanceTypeConfig> getInstanceTypeConfigs(List<EmrClusterDefinitionInstanceTypeConfig> emrClusterDefinitionInstanceTypeConfigs)
    {
        List<InstanceTypeConfig> instanceTypeConfigs = null;

        if (!CollectionUtils.isEmpty(emrClusterDefinitionInstanceTypeConfigs))
        {
            instanceTypeConfigs = new ArrayList<>();

            for (EmrClusterDefinitionInstanceTypeConfig emrClusterDefinitionInstanceTypeConfig : emrClusterDefinitionInstanceTypeConfigs)
            {
                if (emrClusterDefinitionInstanceTypeConfig != null)
                {
                    InstanceTypeConfig instanceTypeConfig = new InstanceTypeConfig();
                    instanceTypeConfig.setInstanceType(emrClusterDefinitionInstanceTypeConfig.getInstanceType());
                    instanceTypeConfig.setWeightedCapacity(emrClusterDefinitionInstanceTypeConfig.getWeightedCapacity());
                    instanceTypeConfig.setBidPrice(emrClusterDefinitionInstanceTypeConfig.getBidPrice());
                    instanceTypeConfig.setBidPriceAsPercentageOfOnDemandPrice(emrClusterDefinitionInstanceTypeConfig.getBidPriceAsPercentageOfOnDemandPrice());
                    instanceTypeConfig.setEbsConfiguration(getEbsConfiguration(emrClusterDefinitionInstanceTypeConfig.getEbsConfiguration()));
                    instanceTypeConfig.setConfigurations(getConfigurations(emrClusterDefinitionInstanceTypeConfig.getConfigurations()));

                    instanceTypeConfigs.add(instanceTypeConfig);
                }
            }
        }

        return instanceTypeConfigs;
    }

}