@Override
    public Properties loadProperties() {
        final Properties answer = new Properties();
        final Config config = ConfigProvider.getConfig();
        for (String name : config.getPropertyNames()) {
            try {
                if (isValidForActiveProfiles(name)) {
                    answer.put(name, config.getValue(name, String.class));
                }
            } catch (NoSuchElementException e) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Failed to resolve property {} due to {}", name, e.getMessage());
                }
            }
        }

        return answer;
    }
@Test
    public void testLoadFiltered() {
        PropertiesComponent pc = context.getPropertiesComponent();
        Properties properties = pc.loadProperties(k -> k.matches("^start$|.*mock$|.*-profile.*"));

        Assertions.assertThat(properties).hasSize(4);
        Assertions.assertThat(properties.get("start")).isEqualTo("direct:start");
        Assertions.assertThat(properties.get("my-mock")).isEqualTo("result");
        Assertions.assertThat(properties.get("test-non-active-profile")).isNull();
        Assertions.assertThat(properties.get("test-profile-a")).isEqualTo("Profile A");
        Assertions.assertThat(properties.get("test-profile-b")).isEqualTo("Profile B");
    }