protected byte[] fetchMetadata() {
        var sql = String.format("SELECT metadata FROM %s WHERE entityId='%s'", this.tableName, this.entityId);
        return decodeMetadata(template.queryForObject(sql, String.class));
    }
<p>fetchMetadata.</p>

@return an array of {@link byte} objects
pac4j-saml/src/main/java/org/pac4j/saml/metadata/jdbc/SAML2JdbcMetadataGenerator.java