@Override
    public Set<EntityExcerpt> listEntityExcerpts() {
        return eventDefinitionService.streamAll()
                .filter(ed -> ed.config().isContentPackExportable())
                .map(this::createExcerpt)
                .collect(Collectors.toSet());
    }
@Test
    public void listExcerptsExcludesNonContentPackExportableEventDefinitions() {
        EventDefinitionFacade testFacade = new EventDefinitionFacade(
                objectMapper, eventDefinitionHandler, new HashSet<>(), jobDefinitionService, mockEventDefinitionService, userService);
        EventDefinitionDto dto = validEventDefinitionDto(mockEventProcessorConfig);

        when(mockEventProcessorConfig.isContentPackExportable()).thenReturn(false);
        when(mockEventDefinitionService.streamAll()).thenReturn(Stream.of(dto));

        final Set<EntityExcerpt> excerpts = testFacade.listEntityExcerpts();
        assertThat(excerpts.size()).isEqualTo(0);
    }