@Test
    public void shouldSucceedWithValidHeaderAuthToken() throws CertificateEncodingException, IOException {
        String token = generateAndSerializeToken();

        apiRequest.getHeaders().put("Authorization", "Bearer " + token);
        keycloakOauthPolicy.apply(apiRequest, mContext, config, mChain);

        verify(mChain, times(1)).doApply(apiRequest);
        verify(mChain, never()).doFailure(any(PolicyFailure.class));
    }
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