@Override
    public void validate(Context context) {
        if (context.deployState().endpointCertificateSecrets().isPresent() && context.deployState().endpointCertificateSecrets().get().isMissing()) {
            throw new CertificateNotReadyException("TLS enabled, but could not yet retrieve certificate version %s for application %s"
                    .formatted(context.deployState().endpointCertificateSecrets().get().version(), context.deployState().getProperties().applicationId().serializedForm()));
        }
    }
@Test
    void validation_succeeds_without_certificate() throws Exception {
        DeployState deployState = deployState(servicesXml(), deploymentXml(), Optional.empty());
        VespaModel model = new VespaModel(new NullConfigModelRegistry(), deployState);

        ValidationTester.validate(new EndpointCertificateSecretsValidator(), model, deployState);
    }