class DelaysAndMaxRetry {

    public static DelaysAndMaxRetry from(int intendedMaxRetries, String delaysAsString) throws MessagingException {
        List<Delay> delayTimesList = createDelayList(delaysAsString);
        int totalAttempts = computeTotalAttempts(delayTimesList);
        return getDelaysAndMaxRetry(intendedMaxRetries, totalAttempts, delayTimesList);
    }

    @VisibleForTesting  DelaysAndMaxRetry(int maxRetries, List<Delay> delays);

}