@Override
  public String resourceNamePrefix() {
    return appId();
  }
@Test
  void testResourceNamePrefix() {
    // Resource prefix shall be deterministic per SparkApp per attempt
    SparkConf sparkConf = new SparkConf();
    sparkConf.set("foo", "bar");
    sparkConf.set("spark.executor.instances", "1");
    String appId = UUID.randomUUID().toString();
    SparkAppDriverConf sparkAppDriverConf =
        SparkAppDriverConf.create(
            sparkConf, appId, mock(JavaMainAppResource.class), "foo", null, Option.empty());
    String resourcePrefix = sparkAppDriverConf.resourceNamePrefix();
    assertEquals(
        resourcePrefix,
        appId,
        "Secondary resource prfix should be the same as app id, "
            + "but different values are detected");
    assertTrue(
        sparkAppDriverConf.configMapNameDriver().contains(resourcePrefix),
        "ConfigMap name" + " should include secondary resource prefix");
    assertTrue(
        sparkAppDriverConf.driverServiceName().contains(resourcePrefix),
        "Driver service " + "name should include secondary resource prefix");
  }