public static void addSecurityProvider(Properties properties) {
        properties.keySet().stream()
                .filter(key -> key.toString().matches("security\\.provider(\\.\\d+)?"))
                .sorted(Comparator.comparing(String::valueOf)).forEach(key -> addSecurityProvider(properties.get(key).toString()));
    }
@Test
    void addSecurityProviderTestWithConfigForUnconfigurableProvider() {
        removeAllDummyProviders();
        int providersCountBefore = Security.getProviders().length;

        SecurityProviderLoader.addSecurityProvider(DummyProvider.class.getName()+":0:Configure");

        Provider[] providersAfter = Security.getProviders();
        Provider provider = Security.getProvider(DummyProvider.PROVIDER_NAME);

        assertEquals(providersCountBefore + 1, providersAfter.length);
        assertNotNull(provider, "Provider not installed.");
        assertEquals(DummyProvider.class, provider.getClass());
        assertEquals(provider, providersAfter[providersAfter.length - 1]);
    }