public static Replacer clearFlagsForTesting(FlagId... flagsToKeep) {
        return new Replacer(flagsToKeep);
    }
Allows the statically defined flags to be controlled in a test.

<p>Returns a Replacer instance to be used with e.g. a try-with-resources block. Within the block,
the flags starts out as cleared. Flags can be defined, etc. When leaving the block, the flags from
before the block is reinserted.

<p>NOT thread-safe. Tests using this cannot run in parallel.
flags/src/main/java/com/yahoo/vespa/flags/Flags.java