@Test
    void verifySignByteArray() {
        val secret = EncodingUtils.generateJsonWebKey(256);
        val key = new AesKey(secret.getBytes(StandardCharsets.UTF_8));

        val result = JsonWebTokenSigner.builder()
            .key(key)
            .headers(Map.of("name", "value"))
            .algorithm(AlgorithmIdentifiers.HMAC_SHA256)
            .build()
            .sign("ThisIsATest".getBytes(StandardCharsets.UTF_8));
        assertNotNull(result);
    }
This is {@link JsonWebTokenSignerTests}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/jwt/JsonWebTokenSignerTests.java