public List<Issue> validateMetadata(ExtensionVersion extVersion) {
        return Observation.createNotStarted("ExtensionValidator#validateMetadata", observations).observe(() -> {
            var issues = new ArrayList<Issue>();
            checkVersion(extVersion.getVersion(), issues);
            checkTargetPlatform(extVersion.getTargetPlatform(), issues);
            checkCharacters(extVersion.getDisplayName(), "displayName", issues);
            checkFieldSize(extVersion.getDisplayName(), DEFAULT_STRING_SIZE, "displayName", issues);
            checkCharacters(extVersion.getDescription(), "description", issues);
            checkFieldSize(extVersion.getDescription(), DESCRIPTION_SIZE, "description", issues);
            checkCharacters(extVersion.getCategories(), "categories", issues);
            checkFieldSize(extVersion.getCategories(), DEFAULT_STRING_SIZE, "categories", issues);
            checkCharacters(extVersion.getTags(), "keywords", issues);
            checkFieldSize(extVersion.getTags(), DEFAULT_STRING_SIZE, "keywords", issues);
            checkCharacters(extVersion.getLicense(), "license", issues);
            checkFieldSize(extVersion.getLicense(), DEFAULT_STRING_SIZE, "license", issues);
            checkURL(extVersion.getHomepage(), "homepage", issues);
            checkFieldSize(extVersion.getHomepage(), DEFAULT_STRING_SIZE, "homepage", issues);
            checkURL(extVersion.getRepository(), "repository", issues);
            checkFieldSize(extVersion.getRepository(), DEFAULT_STRING_SIZE, "repository", issues);
            checkURL(extVersion.getBugs(), "bugs", issues);
            checkFieldSize(extVersion.getBugs(), DEFAULT_STRING_SIZE, "bugs", issues);
            checkInvalid(extVersion.getMarkdown(), s -> !MARKDOWN_VALUES.contains(s), "markdown", issues,
                    MARKDOWN_VALUES.toString());
            checkCharacters(extVersion.getGalleryColor(), "galleryBanner.color", issues);
            checkFieldSize(extVersion.getGalleryColor(), GALLERY_COLOR_SIZE, "galleryBanner.color", issues);
            checkInvalid(extVersion.getGalleryTheme(), s -> !GALLERY_THEME_VALUES.contains(s), "galleryBanner.theme", issues,
                    GALLERY_THEME_VALUES.toString());
            checkFieldSize(extVersion.getLocalizedLanguages(), DEFAULT_STRING_SIZE, "localizedLanguages", issues);
            checkInvalid(extVersion.getQna(), s -> !QNA_VALUES.contains(s) && isInvalidURL(s), "qna", issues,
                    QNA_VALUES.toString() + " or a URL");
            checkFieldSize(extVersion.getQna(), DEFAULT_STRING_SIZE, "qna", issues);
            return issues;
        });
    }
@Test
    public void testInvalidURL2() {
        var extension = new ExtensionVersion();
        extension.setTargetPlatform(TargetPlatform.NAME_UNIVERSAL);
        extension.setVersion("1.0.0");
        extension.setRepository("https://");
        var issues = validator.validateMetadata(extension);
        assertThat(issues).hasSize(1);
        assertThat(issues.get(0))
                .isEqualTo(new ExtensionValidator.Issue("Invalid URL in field 'repository': https://"));
    }