@Test
    void verifyDefaultApiToken() throws JoseException {
        // Verify the hard coded default token

        final StandardJwtContextFactory jwtService = new StandardJwtContextFactory(
                () -> openIdConfiguration,
                openIdPublicKeysSupplier,
                defaultOpenIdCredentials,
                mockJerseyClientFactory);

        final String apiKey = defaultOpenIdCredentials.getApiKey();

        Mockito.when(openIdPublicKeysSupplier.get())
                .thenReturn(getPublicKeys());
        Mockito.when(openIdConfiguration.getIdentityProviderType())
                .thenReturn(IdpType.TEST_CREDENTIALS);

        final JwtClaims jwtClaims = jwtService
                .getJwtContext(apiKey)
                .map(JwtContext::getJwtClaims)
                .orElseThrow(() -> new RuntimeException("Token failed verification"));
        try {
            LOGGER.info("Claims: \n{}", jwtClaims.toJson());

            assertThat(jwtClaims.getSubject())
                    .isEqualTo(defaultOpenIdCredentials.getApiKeyUserEmail());
            assertThat(jwtClaims.getAudience())
                    .contains(defaultOpenIdCredentials.getOauth2ClientId());
            LocalDateTime expiryTime = LocalDateTime.ofInstant(
                    Instant.ofEpochMilli(jwtClaims.getExpirationTime().getValueInMillis()),
                    ZoneOffset.UTC);

            // Can't be sure when the token was created so just ensure there is a year left on it.
            assertThat(Period.between(
                    LocalDateTime.now(ZoneOffset.UTC).toLocalDate(),
                    expiryTime.toLocalDate()).getYears())
                    .isGreaterThan(1);
        } catch (MalformedClaimException e) {
            e.printStackTrace();
        }
    }
Make sure the hard coded token in {@link DefaultOpenIdCredentials} can be verified
stroom-security/stroom-security-impl/src/test/java/stroom/security/impl/TestJWTService.java