@Override
    public void validate(Context context) {
        Optional<Reader> overrides = context.deployState().getApplicationPackage().getValidationOverrides();
        if (overrides.isEmpty()) return;

        ValidationOverrides validationOverrides = ValidationOverrides.fromXml(overrides.get());
        validationOverrides.validate(context.deployState().now(), context::illegal);
    }
@Test
    void testValidationOverride() throws IOException, SAXException {
        String tenDays = dateTimeFormatter.format(Instant.now().plus(Duration.ofDays(10)));

        var validationOverridesXml = "<?xml version='1.0' encoding='UTF-8'?>\n" +
                "  <validation-overrides>\n" +
                "    <allow until='" + tenDays + "'>deployment-removal</allow>\n" +
                "  </validation-overrides>";

        var deployState = createDeployState(validationOverridesXml);
        VespaModel model = new VespaModel(new NullConfigModelRegistry(), deployState);
        new Validation().validate(model, new ValidationParameters(), deployState);
    }