@Test
    void verifyTokenParsing() {
        val request = new MockHttpServletRequest();
        request.setRemoteAddr("185.86.151.11");
        request.setLocalAddr("185.88.151.11");
        val clientInfo = ClientInfo.from(request);
        ClientInfoHolder.setClientInfo(clientInfo);

        val service = new NoOpPasswordManagementService(CipherExecutor.noOpOfSerializableToString(), casProperties);
        val token = UUID.randomUUID().toString();
        val claims = new JwtClaims();
        claims.setJwtId(token);

        claims.setIssuer("bad-issuer");
        assertNull(service.parseToken(claims.toJson()));

        claims.setIssuer(casProperties.getServer().getPrefix());
        claims.setAudience("other-audience");
        assertNull(service.parseToken(claims.toJson()));

        claims.setAudience(casProperties.getServer().getPrefix());
        claims.setSubject(StringUtils.EMPTY);
        assertNull(service.parseToken(claims.toJson()));

        claims.setClaim("origin", "whatever");
        claims.setSubject("casuser");
        assertNull(service.parseToken(claims.toJson()));

        claims.setClaim("origin", clientInfo.getServerIpAddress());
        claims.setClaim("client", "whatever");
        assertNull(service.parseToken(claims.toJson()));

        claims.setClaim("client", clientInfo.getClientIpAddress());
        val milli = Instant.now(Clock.systemUTC()).minusSeconds(500).toEpochMilli();
        claims.setExpirationTime(NumericDate.fromMilliseconds(milli));
        assertNull(service.parseToken(claims.toJson()));

        claims.setExpirationTime(NumericDate.now());
        assertNotNull(service.parseToken(claims.toJson()));
    }
This is {@link NoOpPasswordManagementServiceTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-pm/src/test/java/org/apereo/cas/pm/impl/NoOpPasswordManagementServiceTests.java