@Test
public void propertiesAreBoundToSourcesConfigurer() {

    CamelContext context = new DefaultCamelContext();
    context.getPropertiesComponent().setInitialProperties(asProperties(
        "camel.k.sources[0].name", "MyRoutesWithBeans",
        "camel.k.sources[0].location", "classpath:MyRoutesWithBeans.java",
        "camel.k.sources[1].name", "MyRoutesConfig",
        "camel.k.sources[1].location", "classpath:MyRoutesConfig.java",
        "camel.k.sources[1].property-names[0]", "foo",
        "camel.k.sources[1].property-names[1]", "bar"
    ));
    SourcesConfigurer configuration = new SourcesConfigurer();
    PropertiesSupport.bindProperties(
        context,
        configuration,
        k -> k.startsWith(SourcesConfigurer.CAMEL_K_SOURCES_PREFIX),
        SourcesConfigurer.CAMEL_K_PREFIX);
    assertThat(configuration.getSources())
        .hasSize(2)
        .anyMatch(byNameAndLocation("MyRoutesWithBeans", "classpath:MyRoutesWithBeans.java")
            .and(d -> d.getPropertyNames() == null))
        .anyMatch(byNameAndLocation("MyRoutesConfig", "classpath:MyRoutesConfig.java")
            .and(d -> d.getPropertyNames() != null && d.getPropertyNames().containsAll(List.of("foo", "bar"))));
}