@Test
    public void shouldForwardAuthInfoSubject() throws CertificateEncodingException, IOException {
        ForwardAuthInfo authInfo = new ForwardAuthInfo();
        authInfo.setHeaders("X-TEST");
        authInfo.setField("email");
        config.getForwardAuthInfo().add(authInfo);

        token.setEmail("apiman@apiman.io");
        String encoded = generateAndSerializeToken();
        apiRequest.getHeaders().put("Authorization", "Bearer " + encoded);
        keycloakOauthPolicy.apply(apiRequest, mContext, config, mChain);

        verify(mChain).doApply(apiRequest);

        Assert.assertEquals("apiman@apiman.io", apiRequest.getHeaders().get("X-TEST"));
    }
Test the {@link KeycloakOauthPolicy}.

With thanks to the Keycloak project for their RSAVerifierTest whose setup procedures are adapted here for
our requirements.

@author Marc Savy {@literal <msavy@redhat.com>}
plugins/keycloak-oauth-policy/src/test/java/io/apiman/plugins/keycloak_oauth_policy/KeycloakOauthPolicyTest.java