public CompositeRegistryEventConsumer(List<RegistryEventConsumer<E>> delegates) {
        this.delegates = new ArrayList<>(requireNonNull(delegates));
    }
@Test
    public void testCompositeRegistryEventConsumer() {
        List<RegistryEventConsumer<String>> consumers = new ArrayList<>();
        TestRegistryEventConsumer registryEventConsumer1 = new TestRegistryEventConsumer();
        TestRegistryEventConsumer registryEventConsumer2 = new TestRegistryEventConsumer();
        consumers.add(registryEventConsumer1);
        consumers.add(registryEventConsumer2);

        CompositeRegistryEventConsumer<String> compositeRegistryEventConsumer = new CompositeRegistryEventConsumer<>(
            consumers);

        TestRegistry testRegistry = new TestRegistry(compositeRegistryEventConsumer);

        String addedEntry1 = testRegistry.computeIfAbsent("name", () -> "entry1");
        assertThat(addedEntry1).isEqualTo("entry1");

        String addedEntry2 = testRegistry.computeIfAbsent("name2", () -> "entry2");
        assertThat(addedEntry2).isEqualTo("entry2");

        Optional<String> removedEntry = testRegistry.remove("name");
        assertThat(removedEntry).isNotEmpty().hasValue("entry1");

        Optional<String> replacedEntry = testRegistry.replace("name2", "entry3");
        assertThat(replacedEntry).isNotEmpty().hasValue("entry2");

        assertConsumer(registryEventConsumer1);
        assertConsumer(registryEventConsumer2);
    }