public String getValue(String key) {
    String currentValue = configOverrides.getProperty(key);
    return StringUtils.isEmpty(currentValue) ? getInitialValue(key) : currentValue;
  }
@Test
  void testLoadPropertiesFromInitFile() throws IOException {
    String propBackUp = System.getProperty("spark.kubernetes.operator.basePropertyFileName");
    try {
      String propsFilePath =
          SparkOperatorConfManagerTest.class
              .getClassLoader()
              .getResource("spark-operator.properties")
              .getPath();
      System.setProperty("spark.kubernetes.operator.basePropertyFileName", propsFilePath);
      SparkOperatorConfManager confManager = new SparkOperatorConfManager();
      Assertions.assertEquals("bar", confManager.getValue("spark.kubernetes.operator.foo"));
    } finally {
      if (StringUtils.isNotEmpty(propBackUp)) {
        System.setProperty("spark.kubernetes.operator.basePropertyFileName", propBackUp);
      } else {
        System.clearProperty("spark.kubernetes.operator.basePropertyFileName");
      }
    }
  }