private String getEnv(String envName, InterpreterLaunchContext context) {
    String env = context.getProperties().getProperty(envName);
    if (StringUtils.isBlank(env)) {
      env = System.getenv(envName);
    }
    if (StringUtils.isBlank(env)) {
      LOGGER.warn("environment variable: {} is empty", envName);
    }

    return env;
  }
@Test
  void testYarnClientMode_1() throws IOException {
    SparkInterpreterLauncher launcher = new SparkInterpreterLauncher(zConf, null);
    Properties properties = new Properties();
    properties.setProperty("SPARK_HOME", sparkHome);
    properties.setProperty("property_1", "value_1");
    properties.setProperty("spark.master", "yarn-client");
    properties.setProperty("spark.files", "file_1");
    properties.setProperty("spark.jars", "jar_1");

    InterpreterOption option = new InterpreterOption();
    InterpreterLaunchContext context = new InterpreterLaunchContext(properties, option, null, "user1", "intpGroupId", "groupId", "spark", "spark", 0, "host");
    InterpreterClient client = launcher.launch(context);
    assertTrue( client instanceof ExecRemoteInterpreterProcess);
    try (ExecRemoteInterpreterProcess interpreterProcess = (ExecRemoteInterpreterProcess) client) {
      assertEquals("spark", interpreterProcess.getInterpreterSettingName());
      assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
      assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
      assertEquals(zConf.getInterpreterRemoteRunnerPath(), interpreterProcess.getInterpreterRunner());
      assertTrue(interpreterProcess.getEnv().size() >= 2);
      assertEquals(sparkHome, interpreterProcess.getEnv().get("SPARK_HOME"));

      String sparkJars = "jar_1";
      String sparkrZip = sparkHome + "/R/lib/sparkr.zip#sparkr";
      String sparkFiles = "file_1";
      String expected = "--conf|spark.yarn.dist.archives=" + sparkrZip +
        "|--conf|spark.files=" + sparkFiles + "|--conf|spark.jars=" + sparkJars +
        "|--conf|spark.yarn.isPython=true|--conf|spark.app.name=intpGroupId|--conf|spark.master=yarn-client";
      assertTrue(CollectionUtils.isEqualCollection(Arrays.asList(expected.split("\\|")),
        Arrays.asList(interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF").split("\\|"))));
    }
  }