class EmrPricingHelper extends AwsHelper {

    EmrClusterPriceDto getEmrClusterPriceWithLowestCoreInstancePrice(final List<EmrClusterPriceDto> emrClusterPrices)
    {
        final List<EmrClusterPriceDto> lowestCoreInstancePriceEmrClusters = getEmrClusterPricesWithinLowestCoreInstancePriceThreshold(emrClusterPrices,
            configurationHelper.getNonNegativeBigDecimalRequiredProperty(ConfigurationValue.EMR_CLUSTER_LOWEST_CORE_INSTANCE_PRICE_PERCENTAGE));
        if (!lowestCoreInstancePriceEmrClusters.isEmpty())
        {
            // Pick one randomly from the lowest core instance price list
            final EmrClusterPriceDto selectedEmrClusterPriceDto =
                lowestCoreInstancePriceEmrClusters.get(new Random().nextInt(lowestCoreInstancePriceEmrClusters.size()));

            // Log the selected pricing as well as the pricing list
            LOGGER.info("selectedEmrCluster={} from lowestCoreInstancePriceEmrClusters={}", jsonHelper.objectToJson(selectedEmrClusterPriceDto),
                jsonHelper.objectToJson(lowestCoreInstancePriceEmrClusters));

            return selectedEmrClusterPriceDto;
        }
        else
        {
            return null;
        }
    }

}