public static boolean overrideExecutorTemplateEnabled(ApplicationSpec applicationSpec) {
    return applicationSpec != null
        && applicationSpec.getExecutorSpec() != null
        && applicationSpec.getExecutorSpec().getPodTemplateSpec() != null;
  }
@Test
  void testOverrideExecutorTemplateEnabled() {
    ApplicationSpec applicationSpec = new ApplicationSpec();
    assertFalse(ModelUtils.overrideDriverTemplateEnabled(applicationSpec));

    BaseApplicationTemplateSpec executorSpec = new BaseApplicationTemplateSpec();
    applicationSpec.setExecutorSpec(executorSpec);
    assertFalse(ModelUtils.overrideDriverTemplateEnabled(applicationSpec));

    executorSpec.setPodTemplateSpec(buildSamplePodTemplateSpec());
    applicationSpec.setDriverSpec(executorSpec);
    assertTrue(ModelUtils.overrideDriverTemplateEnabled(applicationSpec));
  }