docs: @SuppressWarnings("unchecked")
    public static void applyOverridesToStateManagerConfig(Path overridesPath,
          Path stateManagerPath) throws IOException {
      final Path tempStateManagerPath = Files.createTempFile("statemgr-", CONFIG_SUFFIX);
      Reader stateManagerReader = null;
      try (
          Reader overrideReader = Files.newBufferedReader(overridesPath);
          Writer writer = Files.newBufferedWriter(tempStateManagerPath);
      ) {
        stateManagerReader = Files.newBufferedReader(stateManagerPath);
  
        final Map<String, Object> overrides = (Map<String, Object>) new Yaml().load(overrideReader);
        final Map<String, Object> stateMangerConfig =
            (Map<String, Object>) new Yaml().load(stateManagerReader);
        // update the state manager config with the overrides
        for (Map.Entry<String, Object> entry : overrides.entrySet()) {
          // does this key have an override?
          if (stateMangerConfig.containsKey(entry.getKey())) {
            stateMangerConfig.put(entry.getKey(), entry.getValue());
          }
        }
  
        // write new state manager config
        newYaml().dump(stateMangerConfig, writer);
  
        // close state manager file so we can replace it with the updated configuration
        stateManagerReader.close();
  
        FileHelper.copy(tempStateManagerPath, stateManagerPath);
      } finally {
        tempStateManagerPath.toFile().delete();
        SysUtils.closeIgnoringExceptions(stateManagerReader);
      }
    }