@Test
    void bouncyCastlePreInstalled() {
        Security.addProvider(new BouncyCastleProvider());
        try {
            MinifiedBouncyCastleProvider.call(this::loadPkcs5);
            MinifiedBouncyCastleProvider.call(this::loadPkcs8);
        } finally {
            Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);
        }
    }
Tests if everything works even if Bouncy Castle is loaded already.
core/src/test/java/com/linecorp/armeria/internal/common/util/MinifiedBouncyCastleProviderTest.java