public String getEcosystem(DefCveItem cve) {
        final List<Reference> references = Optional.ofNullable(cve)
                .map(DefCveItem::getCve)
                .map(CveItem::getReferences)
                .orElse(null);

        if (Objects.nonNull(references)) {
            for (Reference r : references) {
                final Hit<String> ecosystem = search.findFirst(r.getUrl());
                if (ecosystem != null) {
                    return ecosystem.value;
                }
            }
        }
        return null;
    }
@Test
    public void testGetEcosystemMustHandleNullCve() {
        // Given
        UrlEcosystemMapper mapper = new UrlEcosystemMapper();

        DefCveItem cveItem = new DefCveItem();

        // When
        String output = mapper.getEcosystem(cveItem);

        // Then
        assertNull(output);
    }