@Test
    @Configuration("{\n" +
            "  \"requireJWT\": true,\n" +
            "  \"requireSigned\": false,\n" +
            "  \"requireTransportSecurity\": true,\n" +
            "  \"stripTokens\": true,\n" +
            "  \"signingKeyString\": \""+ PUBLIC_KEY_PEM +"\",\n" +
            "  \"allowedClockSkew\": 0,\n" +
            "  \"requiredClaims\": [{ \"claimName\": \"sub\", \"claimValue\": \"france frichot\" }]\n" +
            "}"
    )
    public void shouldFailWhenTokenExpired() throws Throwable {
        PolicyFailure failure = null;
        PolicyTestRequest request = PolicyTestRequest.build(PolicyTestRequestType.GET, "/amirante")
                    .header("Authorization", "Bearer " + unsignedExpiredToken());
        try {
            send(request);
        } catch (PolicyFailureError pfe) {
            failure = pfe.getFailure();
        }
        Assert.assertNotNull(failure);
        Assert.assertEquals(401, failure.getResponseCode());
        Assert.assertEquals(12006, failure.getFailureCode());
        Assert.assertEquals(PolicyFailureType.Authentication, failure.getType());
    }
@author Marc Savy {@literal <msavy@redhat.com>}
plugins/jwt-policy/src/test/java/io/apiman/plugins/jwt/JWTPolicyTest.java