class EmrDaoImpl implements EmrDao {

    protected List<InstanceFleetConfig> getInstanceFleets(List<EmrClusterDefinitionInstanceFleet> emrClusterDefinitionInstanceFleets)
    {
        List<InstanceFleetConfig> instanceFleets = null;

        if (!CollectionUtils.isEmpty(emrClusterDefinitionInstanceFleets))
        {
            instanceFleets = new ArrayList<>();

            for (EmrClusterDefinitionInstanceFleet emrClusterDefinitionInstanceFleet : emrClusterDefinitionInstanceFleets)
            {
                if (emrClusterDefinitionInstanceFleet != null)
                {
                    InstanceFleetConfig instanceFleetConfig = new InstanceFleetConfig();
                    instanceFleetConfig.setName(emrClusterDefinitionInstanceFleet.getName());
                    instanceFleetConfig.setInstanceFleetType(emrClusterDefinitionInstanceFleet.getInstanceFleetType());
                    instanceFleetConfig.setTargetOnDemandCapacity(emrClusterDefinitionInstanceFleet.getTargetOnDemandCapacity());
                    instanceFleetConfig.setTargetSpotCapacity(emrClusterDefinitionInstanceFleet.getTargetSpotCapacity());
                    instanceFleetConfig.setInstanceTypeConfigs(getInstanceTypeConfigs(emrClusterDefinitionInstanceFleet.getInstanceTypeConfigs()));
                    instanceFleetConfig.setLaunchSpecifications(getLaunchSpecifications(emrClusterDefinitionInstanceFleet.getLaunchSpecifications()));

                    instanceFleets.add(instanceFleetConfig);
                }
            }
        }

        return instanceFleets;
    }

}