public PublicKey convertPublicKey(final String publicPemKey) {

        final StringReader keyReader = new StringReader(publicPemKey);
        try {
            SubjectPublicKeyInfo publicKeyInfo = SubjectPublicKeyInfo
                    .getInstance(new PEMParser(keyReader).readObject());
            return new JcaPEMKeyConverter().getPublicKey(publicKeyInfo);
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        }

    }
@Test
    void givenEmptyPublicKey_whenConvertPublicKey_thenThrowRuntimeException() {
        // Given
        String emptyPublicPemKey = "";

        // When & Then
        assertThatThrownBy(() -> KeyConverter.convertPublicKey(emptyPublicPemKey))
                .isInstanceOf(RuntimeException.class)
                .hasCauseInstanceOf(PEMException.class)
                .hasMessageContaining("PEMException");
    }