<commit_before>package io.specto.hoverfly.junit.dsl;

import io.specto.hoverfly.junit.core.model.DelaySettings;

import java.util.concurrent.TimeUnit;

public class StubServiceDelaySettingsBuilder extends AbstractDelaySettingsBuilder {

    private final StubServiceBuilder invoker;

    StubServiceDelaySettingsBuilder(int delay, TimeUnit delayTimeUnit, StubServiceBuilder invoker) {
        super(delay, delayTimeUnit);
        this.invoker = invoker;
    }

    public StubServiceBuilder forAll() {
        if (getConvertedDelay() > 0) {
            String destination = invoker.getDestination();
            invoker.addDelaySetting(new DelaySettings(toPattern(destination), getConvertedDelay(), null));
        }
        return invoker;
    }
<commit_msg>#21 use isValid instead of getConvertedDelay() in forAll()<commit_after>package io.specto.hoverfly.junit.dsl;

import io.specto.hoverfly.junit.core.model.DelaySettings;

import java.util.concurrent.TimeUnit;

public class StubServiceDelaySettingsBuilder extends AbstractDelaySettingsBuilder {

    private final StubServiceBuilder invoker;

    StubServiceDelaySettingsBuilder(int delay, TimeUnit delayTimeUnit, StubServiceBuilder invoker) {
        super(delay, delayTimeUnit);
        this.invoker = invoker;
    }

    public StubServiceBuilder forAll() {
        if (isValid()) {
            String destination = invoker.getDestination();
            invoker.addDelaySetting(new DelaySettings(toPattern(destination), getConvertedDelay(), null));
        }
        return invoker;
    }

{'fraction_non_alphanumeric': 0.08392511297611362, 'fraction_numerical': 0.001936733376371853, 'mean_word_length': 3.8742138364779874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4630372', 'n_tokens_mistral': 426, 'n_tokens_neox': 420, 'n_words': 86}