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

    BaseApplicationTemplateSpec driverSpec = new BaseApplicationTemplateSpec();
    applicationSpec.setDriverSpec(driverSpec);
    assertFalse(ModelUtils.overrideDriverTemplateEnabled(applicationSpec));

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