static void setPropertiesForRecipientList(
            RecipientList recipientList, CamelContext camelContext, DynamicRouterConfiguration cfg) {
        recipientList.setAggregationStrategy(createAggregationStrategy(camelContext, cfg));
        recipientList.setParallelProcessing(cfg.isParallelProcessing());
        recipientList.setParallelAggregate(cfg.isParallelAggregate());
        recipientList.setSynchronous(cfg.isSynchronous());
        recipientList.setStreaming(cfg.isStreaming());
        recipientList.setShareUnitOfWork(cfg.isShareUnitOfWork());
        recipientList.setStopOnException(cfg.isStopOnException());
        recipientList.setIgnoreInvalidEndpoints(cfg.isIgnoreInvalidEndpoints());
        recipientList.setCacheSize(cfg.getCacheSize());
        if (cfg.getOnPrepare() != null) {
            recipientList.setOnPrepare(mandatoryLookup(camelContext, cfg.getOnPrepare(), Processor.class));
        }
        if (cfg.getTimeout() > 0 && !cfg.isParallelProcessing()) {
            throw new IllegalArgumentException("Timeout is used but ParallelProcessing has not been enabled.");
        }
        recipientList.setTimeout(cfg.getTimeout());
    }
@Test
    void testSetPropertiesForRecipientList() {
        // Set up mocking
        when(mockConfig.isParallelProcessing()).thenReturn(true);
        when(mockConfig.isParallelAggregate()).thenReturn(true);
        when(mockConfig.isSynchronous()).thenReturn(true);
        when(mockConfig.isStreaming()).thenReturn(true);
        when(mockConfig.isShareUnitOfWork()).thenReturn(true);
        when(mockConfig.isStopOnException()).thenReturn(true);
        when(mockConfig.isIgnoreInvalidEndpoints()).thenReturn(true);
        when(mockConfig.getCacheSize()).thenReturn(10);
        // Invoke the method under test
        DynamicRouterRecipientListHelper.setPropertiesForRecipientList(recipientList, camelContext, mockConfig);
        // Verify results
        verify(recipientList, times(1)).setParallelProcessing(true);
        verify(recipientList, times(1)).setParallelAggregate(true);
        verify(recipientList, times(1)).setSynchronous(true);
        verify(recipientList, times(1)).setStreaming(true);
        verify(recipientList, times(1)).setShareUnitOfWork(true);
        verify(recipientList, times(1)).setStopOnException(true);
        verify(recipientList, times(1)).setIgnoreInvalidEndpoints(true);
        verify(recipientList, times(1)).setCacheSize(10);
    }