@Test
    void verifyFailsOperation() {
        val id = UUID.randomUUID().toString();
        val validator = new CipheredCredentialsValidator(CipherExecutor.noOp());
        val credential = new Credential();
        val token = mock(UsernameToken.class);
        when(token.getName()).thenReturn(id);
        when(token.getPassword()).thenReturn(UUID.randomUUID().toString());
        credential.setUsernametoken(token);
        assertThrows(WSSecurityException.class, () -> validator.validate(credential, mock(RequestData.class)));
    }
This is {@link CipheredCredentialsValidatorTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-ws-sts-api/src/test/java/org/apereo/cas/support/validation/CipheredCredentialsValidatorTests.java